public final class RocksDBResourceContainer extends Object implements AutoCloseable
This should be the only entrance for RocksDBStateBackend
to get RocksDB options, and
should be properly (and necessarily) closed to prevent resource leak.
Constructor and Description |
---|
RocksDBResourceContainer() |
RocksDBResourceContainer(PredefinedOptions predefinedOptions,
RocksDBOptionsFactory optionsFactory) |
RocksDBResourceContainer(PredefinedOptions predefinedOptions,
RocksDBOptionsFactory optionsFactory,
OpaqueMemoryResource<org.apache.flink.contrib.streaming.state.RocksDBSharedResources> sharedResources) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
org.rocksdb.ColumnFamilyOptions |
getColumnOptions()
Gets the RocksDB
ColumnFamilyOptions to be used for all RocksDB instances. |
org.rocksdb.DBOptions |
getDbOptions()
Gets the RocksDB
DBOptions to be used for RocksDB instances. |
org.rocksdb.ReadOptions |
getReadOptions()
Gets the RocksDB
ReadOptions to be used for read operations. |
org.rocksdb.WriteOptions |
getWriteOptions()
Gets the RocksDB
WriteOptions to be used for write operations. |
public RocksDBResourceContainer()
public RocksDBResourceContainer(PredefinedOptions predefinedOptions, @Nullable RocksDBOptionsFactory optionsFactory)
public RocksDBResourceContainer(PredefinedOptions predefinedOptions, @Nullable RocksDBOptionsFactory optionsFactory, @Nullable OpaqueMemoryResource<org.apache.flink.contrib.streaming.state.RocksDBSharedResources> sharedResources)
public org.rocksdb.DBOptions getDbOptions()
DBOptions
to be used for RocksDB instances.public org.rocksdb.ColumnFamilyOptions getColumnOptions()
ColumnFamilyOptions
to be used for all RocksDB instances.public org.rocksdb.WriteOptions getWriteOptions()
WriteOptions
to be used for write operations.public org.rocksdb.ReadOptions getReadOptions()
ReadOptions
to be used for read operations.public void close() throws Exception
close
in interface AutoCloseable
Exception
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.