Package org.apache.flink.state.rocksdb
Class RocksDBWriteBatchWrapper
- java.lang.Object
-
- org.apache.flink.state.rocksdb.RocksDBWriteBatchWrapper
-
- All Implemented Interfaces:
AutoCloseable
public class RocksDBWriteBatchWrapper extends Object implements AutoCloseable
It's a wrapper class around RocksDB'sWriteBatch
for writing in bulk.IMPORTANT: This class is not thread safe.
-
-
Constructor Summary
Constructors Constructor 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, int capacity, long batchSize, int cancellationCheckInterval, long cancellationCheckIntervalBytes)
RocksDBWriteBatchWrapper(org.rocksdb.RocksDB rocksDB, org.rocksdb.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
put(org.rocksdb.ColumnFamilyHandle handle, byte[] key, byte[] value)
void
remove(org.rocksdb.ColumnFamilyHandle handle, byte[] key)
-
-
-
Constructor Detail
-
RocksDBWriteBatchWrapper
public RocksDBWriteBatchWrapper(@Nonnull org.rocksdb.RocksDB rocksDB, long writeBatchSize)
-
RocksDBWriteBatchWrapper
public RocksDBWriteBatchWrapper(@Nonnull org.rocksdb.RocksDB rocksDB, @Nullable org.rocksdb.WriteOptions options)
-
RocksDBWriteBatchWrapper
public RocksDBWriteBatchWrapper(@Nonnull org.rocksdb.RocksDB rocksDB, @Nullable org.rocksdb.WriteOptions options, long batchSize)
-
RocksDBWriteBatchWrapper
public RocksDBWriteBatchWrapper(@Nonnull org.rocksdb.RocksDB rocksDB, @Nullable org.rocksdb.WriteOptions options, int capacity, long batchSize)
-
RocksDBWriteBatchWrapper
public RocksDBWriteBatchWrapper(@Nonnull org.rocksdb.RocksDB rocksDB, @Nullable org.rocksdb.WriteOptions options, int capacity, long batchSize, int cancellationCheckInterval, long cancellationCheckIntervalBytes)
-
-
Method Detail
-
put
public void put(@Nonnull org.rocksdb.ColumnFamilyHandle handle, @Nonnull byte[] key, @Nonnull byte[] value) throws org.rocksdb.RocksDBException
- Throws:
org.rocksdb.RocksDBException
-
remove
public void remove(@Nonnull org.rocksdb.ColumnFamilyHandle handle, @Nonnull byte[] key) throws org.rocksdb.RocksDBException
- Throws:
org.rocksdb.RocksDBException
-
flush
public void flush() throws org.rocksdb.RocksDBException
- Throws:
org.rocksdb.RocksDBException
-
markCancelled
public void markCancelled()
-
getCancelCloseable
public Closeable getCancelCloseable()
-
close
public void close() throws org.rocksdb.RocksDBException
- Specified by:
close
in interfaceAutoCloseable
- Throws:
org.rocksdb.RocksDBException
-
-