Package org.dizitart.no2.rocksdb
Class RocksDBModuleBuilder
- java.lang.Object
-
- org.dizitart.no2.rocksdb.RocksDBModuleBuilder
-
public class RocksDBModuleBuilder extends Object
A builder class to create a RocksDBModule instance with the desired configuration.- Since:
- 4.0
- Author:
- Anindya Chatterjee
- See Also:
RocksDBModule
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description RocksDBModuleBuilderaddStoreEventListener(StoreEventListener listener)Adds aStoreEventListenerto the module builder.RocksDBModulebuild()Builds aRocksDBModulewith the specified configuration.org.rocksdb.ColumnFamilyOptionscolumnFamilyOptions()The RocksDBColumnFamilyOptionsused by the module builder.RocksDBModuleBuildercolumnFamilyOptions(org.rocksdb.ColumnFamilyOptions columnFamilyOptions)The RocksDBColumnFamilyOptionsused by the module builder.RocksDBConfigdbConfig()The RocksDB configuration for the module.RocksDBModuleBuilderdbConfig(RocksDBConfig dbConfig)The RocksDB configuration for the module.org.rocksdb.DBOptionsdbOptions()The RocksDBDBOptionsused by the module builder.RocksDBModuleBuilderdbOptions(org.rocksdb.DBOptions dbOptions)The RocksDBDBOptionsused by the module builder.Set<StoreEventListener>eventListeners()StringfilePath()The file path of the RocksDB data store.RocksDBModuleBuilderfilePath(File file)Sets the file path for the RocksDB data store.RocksDBModuleBuilderfilePath(String path)Sets the file path for the RocksDB data store.ObjectFormatterobjectFormatter()The object formatter used to serialize and deserialize objects.RocksDBModuleBuilderobjectFormatter(ObjectFormatter objectFormatter)The object formatter used to serialize and deserialize objects.org.rocksdb.Optionsoptions()The RocksDBOptionsused by the module builder.RocksDBModuleBuilderoptions(org.rocksdb.Options options)The RocksDBOptionsused by the module builder.
-
-
-
Method Detail
-
filePath
public RocksDBModuleBuilder filePath(File file)
Sets the file path for the RocksDB data store.- Parameters:
file- the file path for the RocksDB data store.- Returns:
- the
RocksDBModuleBuilderinstance.
-
filePath
public RocksDBModuleBuilder filePath(String path)
Sets the file path for the RocksDB data store.- Parameters:
path- the file path for the RocksDB data store.- Returns:
- the current
RocksDBModuleBuilderinstance.
-
addStoreEventListener
public RocksDBModuleBuilder addStoreEventListener(StoreEventListener listener)
Adds aStoreEventListenerto the module builder.- Parameters:
listener- the listener to add- Returns:
- the
RocksDBModuleBuilderinstance
-
build
public RocksDBModule build()
Builds aRocksDBModulewith the specified configuration.- Returns:
- the
RocksDBModuleinstance.
-
filePath
public String filePath()
The file path of the RocksDB data store.
-
options
public org.rocksdb.Options options()
The RocksDBOptionsused by the module builder.
-
dbOptions
public org.rocksdb.DBOptions dbOptions()
The RocksDBDBOptionsused by the module builder.
-
columnFamilyOptions
public org.rocksdb.ColumnFamilyOptions columnFamilyOptions()
The RocksDBColumnFamilyOptionsused by the module builder.
-
objectFormatter
public ObjectFormatter objectFormatter()
The object formatter used to serialize and deserialize objects.
-
dbConfig
public RocksDBConfig dbConfig()
The RocksDB configuration for the module.
-
eventListeners
public Set<StoreEventListener> eventListeners()
-
options
public RocksDBModuleBuilder options(org.rocksdb.Options options)
The RocksDBOptionsused by the module builder.- Returns:
this.
-
dbOptions
public RocksDBModuleBuilder dbOptions(org.rocksdb.DBOptions dbOptions)
The RocksDBDBOptionsused by the module builder.- Returns:
this.
-
columnFamilyOptions
public RocksDBModuleBuilder columnFamilyOptions(org.rocksdb.ColumnFamilyOptions columnFamilyOptions)
The RocksDBColumnFamilyOptionsused by the module builder.- Returns:
this.
-
objectFormatter
public RocksDBModuleBuilder objectFormatter(ObjectFormatter objectFormatter)
The object formatter used to serialize and deserialize objects.- Returns:
this.
-
dbConfig
public RocksDBModuleBuilder dbConfig(RocksDBConfig dbConfig)
The RocksDB configuration for the module.- Returns:
this.
-
-