public class OptionsUtil
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getLatestOptionsFileName(java.lang.String dbPath,
Env env)
Returns the latest options file name under the specified RocksDB path.
|
static void |
loadLatestOptions(ConfigOptions configOptions,
java.lang.String dbPath,
DBOptions dbOptions,
java.util.List<ColumnFamilyDescriptor> cfDescs)
A static method to construct the DBOptions and ColumnFamilyDescriptors by
loading the latest RocksDB options file stored in the specified rocksdb
database.
|
static void |
loadOptionsFromFile(ConfigOptions configOptions,
java.lang.String optionsFileName,
DBOptions dbOptions,
java.util.List<ColumnFamilyDescriptor> cfDescs)
Similar to LoadLatestOptions, this function constructs the DBOptions
and ColumnFamilyDescriptors based on the specified RocksDB Options file.
|
public static void loadLatestOptions(ConfigOptions configOptions, java.lang.String dbPath, DBOptions dbOptions, java.util.List<ColumnFamilyDescriptor> cfDescs) throws RocksDBException
dbPath - the path to the RocksDB.configOptions - ConfigOptions instance.dbOptions - DBOptions instance. This will be
filled and returned.cfDescs - A list of ColumnFamilyDescriptor's be
returned.RocksDBException - thrown if error happens in underlying
native library.public static void loadOptionsFromFile(ConfigOptions configOptions, java.lang.String optionsFileName, DBOptions dbOptions, java.util.List<ColumnFamilyDescriptor> cfDescs) throws RocksDBException
optionsFileName - the RocksDB options file path.configOptions - ConfigOptions instance.dbOptions - DBOptions instance. This will be
filled and returned.cfDescs - A list of ColumnFamilyDescriptor's be
returned.RocksDBException - thrown if error happens in underlying
native library.public static java.lang.String getLatestOptionsFileName(java.lang.String dbPath,
Env env)
throws RocksDBException
dbPath - the path to the RocksDB.env - Env instance.RocksDBException - thrown if error happens in underlying
native library.