public ListenableFuture put()

in simplestore/src/main/java/com/uber/simplestore/primitive/PrimitiveSimpleStoreImpl.java [130:144]


  public ListenableFuture<Long> put(String key, long value) {
    byte[] bytes;
    if (value != 0) {
      long v = value;
      bytes = new byte[8];
      // encode big endian
      for (int i = 7; i >= 0; i--) {
        bytes[i] = (byte) (v & 0xffL);
        v >>= 8;
      }
    } else {
      bytes = null;
    }
    return Futures.transform(put(key, bytes), (v) -> value, directExecutor());
  }