public class RocksDBWriteBatchWrapper extends Object implements AutoCloseable
WriteBatch
for writing in bulk.
IMPORTANT: This class is not thread safe.
Constructor and Description |
---|
RocksDBWriteBatchWrapper(org.rocksdb.RocksDB rocksDB,
long writeBatchSize) |
RocksDBWriteBatchWrapper(org.rocksdb.RocksDB rocksDB,
org.rocksdb.WriteOptions options) |
RocksDBWriteBatchWrapper(org.rocksdb.RocksDB rocksDB,
org.rocksdb.WriteOptions options,
int capacity,
long batchSize) |
RocksDBWriteBatchWrapper(org.rocksdb.RocksDB rocksDB,
org.rocksdb.WriteOptions options,
long batchSize) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
void |
flush() |
void |
put(org.rocksdb.ColumnFamilyHandle handle,
byte[] key,
byte[] value) |
void |
remove(org.rocksdb.ColumnFamilyHandle handle,
byte[] key) |
public RocksDBWriteBatchWrapper(@Nonnull org.rocksdb.RocksDB rocksDB, long writeBatchSize)
public RocksDBWriteBatchWrapper(@Nonnull org.rocksdb.RocksDB rocksDB, @Nullable org.rocksdb.WriteOptions options)
public RocksDBWriteBatchWrapper(@Nonnull org.rocksdb.RocksDB rocksDB, @Nullable org.rocksdb.WriteOptions options, long batchSize)
public void put(@Nonnull org.rocksdb.ColumnFamilyHandle handle, @Nonnull byte[] key, @Nonnull byte[] value) throws org.rocksdb.RocksDBException
org.rocksdb.RocksDBException
public void remove(@Nonnull org.rocksdb.ColumnFamilyHandle handle, @Nonnull byte[] key) throws org.rocksdb.RocksDBException
org.rocksdb.RocksDBException
public void flush() throws org.rocksdb.RocksDBException
org.rocksdb.RocksDBException
public void close() throws org.rocksdb.RocksDBException
close
in interface AutoCloseable
org.rocksdb.RocksDBException
Copyright © 2014–2024 The Apache Software Foundation. All rights reserved.