Package org.apache.flink.state.forst
Class ForStDBWriteBatchWrapper
- java.lang.Object
-
- org.apache.flink.state.forst.ForStDBWriteBatchWrapper
-
- All Implemented Interfaces:
AutoCloseable
public class ForStDBWriteBatchWrapper extends Object implements AutoCloseable
It's a wrapper class around ForStDB'sWriteBatch
for writing in bulk.IMPORTANT: This class is not thread safe.
-
-
Constructor Summary
Constructors Constructor Description ForStDBWriteBatchWrapper(org.forstdb.RocksDB rocksDB, long writeBatchSize)
ForStDBWriteBatchWrapper(org.forstdb.RocksDB rocksDB, org.forstdb.WriteOptions options)
ForStDBWriteBatchWrapper(org.forstdb.RocksDB rocksDB, org.forstdb.WriteOptions options, int capacity, long batchSize)
ForStDBWriteBatchWrapper(org.forstdb.RocksDB rocksDB, org.forstdb.WriteOptions options, long batchSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
void
flush()
Closeable
getCancelCloseable()
void
markCancelled()
void
merge(org.forstdb.ColumnFamilyHandle handle, byte[] key, byte[] value)
void
put(org.forstdb.ColumnFamilyHandle handle, byte[] key, byte[] value)
void
remove(org.forstdb.ColumnFamilyHandle handle, byte[] key)
-
-
-
Constructor Detail
-
ForStDBWriteBatchWrapper
public ForStDBWriteBatchWrapper(@Nonnull org.forstdb.RocksDB rocksDB, long writeBatchSize)
-
ForStDBWriteBatchWrapper
public ForStDBWriteBatchWrapper(@Nonnull org.forstdb.RocksDB rocksDB, @Nullable org.forstdb.WriteOptions options)
-
ForStDBWriteBatchWrapper
public ForStDBWriteBatchWrapper(@Nonnull org.forstdb.RocksDB rocksDB, @Nullable org.forstdb.WriteOptions options, long batchSize)
-
ForStDBWriteBatchWrapper
public ForStDBWriteBatchWrapper(@Nonnull org.forstdb.RocksDB rocksDB, @Nullable org.forstdb.WriteOptions options, int capacity, long batchSize)
-
-
Method Detail
-
put
public void put(@Nonnull org.forstdb.ColumnFamilyHandle handle, @Nonnull byte[] key, @Nonnull byte[] value) throws org.forstdb.RocksDBException
- Throws:
org.forstdb.RocksDBException
-
remove
public void remove(@Nonnull org.forstdb.ColumnFamilyHandle handle, @Nonnull byte[] key) throws org.forstdb.RocksDBException
- Throws:
org.forstdb.RocksDBException
-
merge
public void merge(@Nonnull org.forstdb.ColumnFamilyHandle handle, @Nonnull byte[] key, @Nonnull byte[] value) throws org.forstdb.RocksDBException
- Throws:
org.forstdb.RocksDBException
-
flush
public void flush() throws org.forstdb.RocksDBException
- Throws:
org.forstdb.RocksDBException
-
close
public void close() throws org.forstdb.RocksDBException
- Specified by:
close
in interfaceAutoCloseable
- Throws:
org.forstdb.RocksDBException
-
markCancelled
public void markCancelled()
-
getCancelCloseable
public Closeable getCancelCloseable()
-
-