|
|
@ -39,8 +39,8 @@ public interface WriteBatchInterface { |
|
|
|
* @param value the value associated with the specified key. |
|
|
|
* @param value the value associated with the specified key. |
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void put(ColumnFamilyHandle columnFamilyHandle, |
|
|
|
void put(ColumnFamilyHandle columnFamilyHandle, byte[] key, byte[] value) |
|
|
|
byte[] key, byte[] value) throws RocksDBException; |
|
|
|
throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Store the mapping "key->value" within given column |
|
|
|
* <p>Store the mapping "key->value" within given column |
|
|
@ -52,7 +52,7 @@ public interface WriteBatchInterface { |
|
|
|
* Supports direct buffer only. |
|
|
|
* Supports direct buffer only. |
|
|
|
* @throws RocksDBException |
|
|
|
* @throws RocksDBException |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void put(ByteBuffer key, ByteBuffer value) throws RocksDBException; |
|
|
|
void put(final ByteBuffer key, final ByteBuffer value) throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>Store the mapping "key->value" within given column |
|
|
|
* <p>Store the mapping "key->value" within given column |
|
|
@ -66,7 +66,7 @@ public interface WriteBatchInterface { |
|
|
|
* Supports direct buffer only. |
|
|
|
* Supports direct buffer only. |
|
|
|
* @throws RocksDBException |
|
|
|
* @throws RocksDBException |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void put(ColumnFamilyHandle columnFamilyHandle, ByteBuffer key, ByteBuffer value) |
|
|
|
void put(ColumnFamilyHandle columnFamilyHandle, final ByteBuffer key, final ByteBuffer value) |
|
|
|
throws RocksDBException; |
|
|
|
throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -90,8 +90,8 @@ public interface WriteBatchInterface { |
|
|
|
* the specified key. |
|
|
|
* the specified key. |
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void merge(ColumnFamilyHandle columnFamilyHandle, |
|
|
|
void merge(ColumnFamilyHandle columnFamilyHandle, byte[] key, byte[] value) |
|
|
|
byte[] key, byte[] value) throws RocksDBException; |
|
|
|
throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* <p>If the database contains a mapping for "key", erase it. Else do nothing.</p> |
|
|
|
* <p>If the database contains a mapping for "key", erase it. Else do nothing.</p> |
|
|
@ -114,7 +114,31 @@ public interface WriteBatchInterface { |
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Deprecated |
|
|
|
@Deprecated |
|
|
|
void remove(ColumnFamilyHandle columnFamilyHandle, byte[] key) |
|
|
|
void remove(ColumnFamilyHandle columnFamilyHandle, byte[] key) throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* <p>If column family contains a mapping for "key", erase it. Else do nothing.</p> |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param key Key to delete within database. It is using position and limit. |
|
|
|
|
|
|
|
* Supports direct buffer only. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @deprecated Use {@link #delete(ByteBuffer)} |
|
|
|
|
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Deprecated void remove(final ByteBuffer key) throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* <p>If column family contains a mapping for "key", erase it. Else do nothing.</p> |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param columnFamilyHandle {@link ColumnFamilyHandle} instance |
|
|
|
|
|
|
|
* @param key Key to delete within database. It is using position and limit. |
|
|
|
|
|
|
|
* Supports direct buffer only. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @deprecated Use {@link #delete(ColumnFamilyHandle, ByteBuffer)} |
|
|
|
|
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
@Deprecated |
|
|
|
|
|
|
|
void remove(ColumnFamilyHandle columnFamilyHandle, final ByteBuffer key) |
|
|
|
throws RocksDBException; |
|
|
|
throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -132,7 +156,28 @@ public interface WriteBatchInterface { |
|
|
|
* @param key Key to delete within database |
|
|
|
* @param key Key to delete within database |
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void delete(ColumnFamilyHandle columnFamilyHandle, byte[] key) |
|
|
|
void delete(ColumnFamilyHandle columnFamilyHandle, byte[] key) throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* <p>If column family contains a mapping for "key", erase it. Else do nothing.</p> |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param key Key to delete within database. It is using position and limit. |
|
|
|
|
|
|
|
* Supports direct buffer only. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void delete(final ByteBuffer key) throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* <p>If column family contains a mapping for "key", erase it. Else do nothing.</p> |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param columnFamilyHandle {@link ColumnFamilyHandle} instance |
|
|
|
|
|
|
|
* @param key Key to delete within database. It is using position and limit. |
|
|
|
|
|
|
|
* Supports direct buffer only. |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void delete(ColumnFamilyHandle columnFamilyHandle, final ByteBuffer key) |
|
|
|
throws RocksDBException; |
|
|
|
throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
@ -182,27 +227,8 @@ public interface WriteBatchInterface { |
|
|
|
* native library. |
|
|
|
* native library. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Experimental("Performance optimization for a very specific workload") |
|
|
|
@Experimental("Performance optimization for a very specific workload") |
|
|
|
void singleDelete(final ColumnFamilyHandle columnFamilyHandle, |
|
|
|
void singleDelete(final ColumnFamilyHandle columnFamilyHandle, final byte[] key) |
|
|
|
final byte[] key) throws RocksDBException; |
|
|
|
throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* <p>If column family contains a mapping for "key", erase it. Else do nothing.</p> |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param key Key to delete within database. It is using position and limit. |
|
|
|
|
|
|
|
* Supports direct buffer only. |
|
|
|
|
|
|
|
* @throws RocksDBException |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void remove(ByteBuffer key) throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* <p>If column family contains a mapping for "key", erase it. Else do nothing.</p> |
|
|
|
|
|
|
|
* |
|
|
|
|
|
|
|
* @param columnFamilyHandle {@link ColumnFamilyHandle} instance |
|
|
|
|
|
|
|
* @param key Key to delete within database. It is using position and limit. |
|
|
|
|
|
|
|
* Supports direct buffer only. |
|
|
|
|
|
|
|
* @throws RocksDBException |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
void remove(ColumnFamilyHandle columnFamilyHandle, ByteBuffer key) throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Removes the database entries in the range ["beginKey", "endKey"), i.e., |
|
|
|
* Removes the database entries in the range ["beginKey", "endKey"), i.e., |
|
|
@ -237,8 +263,8 @@ public interface WriteBatchInterface { |
|
|
|
* Last key to delete within database (excluded) |
|
|
|
* Last key to delete within database (excluded) |
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
* @throws RocksDBException thrown if error happens in underlying native library. |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
void deleteRange(ColumnFamilyHandle columnFamilyHandle, byte[] beginKey, |
|
|
|
void deleteRange(ColumnFamilyHandle columnFamilyHandle, byte[] beginKey, byte[] endKey) |
|
|
|
byte[] endKey) throws RocksDBException; |
|
|
|
throws RocksDBException; |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* Append a blob of arbitrary size to the records in this batch. The blob will |
|
|
|
* Append a blob of arbitrary size to the records in this batch. The blob will |
|
|
|