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(java.lang.String dbPath,
Env env,
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 |
loadLatestOptions(java.lang.String dbPath,
Env env,
DBOptions dbOptions,
java.util.List<ColumnFamilyDescriptor> cfDescs,
boolean ignoreUnknownOptions) |
static void |
loadOptionsFromFile(java.lang.String optionsFileName,
Env env,
DBOptions dbOptions,
java.util.List<ColumnFamilyDescriptor> cfDescs)
Similar to LoadLatestOptions, this function constructs the DBOptions
and ColumnFamilyDescriptors based on the specified RocksDB Options file.
|
static void |
loadOptionsFromFile(java.lang.String optionsFileName,
Env env,
DBOptions dbOptions,
java.util.List<ColumnFamilyDescriptor> cfDescs,
boolean ignoreUnknownOptions) |
public static void loadLatestOptions(java.lang.String dbPath,
Env env,
DBOptions dbOptions,
java.util.List<ColumnFamilyDescriptor> cfDescs)
throws RocksDBException
dbPath - the path to the RocksDB.env - Env 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 loadLatestOptions(java.lang.String dbPath,
Env env,
DBOptions dbOptions,
java.util.List<ColumnFamilyDescriptor> cfDescs,
boolean ignoreUnknownOptions)
throws RocksDBException
dbPath - the path to the RocksDB.env - Env instance.dbOptions - DBOptions instance. This will be
filled and returned.cfDescs - A list of ColumnFamilyDescriptor's be
returned.ignoreUnknownOptions - this flag can be set to true if you want to
ignore options that are from a newer version of the db, esentially for
forward compatibility.RocksDBException - thrown if error happens in underlying
native library.public static void loadOptionsFromFile(java.lang.String optionsFileName,
Env env,
DBOptions dbOptions,
java.util.List<ColumnFamilyDescriptor> cfDescs)
throws RocksDBException
optionsFileName - the RocksDB options file path.env - Env 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(java.lang.String optionsFileName,
Env env,
DBOptions dbOptions,
java.util.List<ColumnFamilyDescriptor> cfDescs,
boolean ignoreUnknownOptions)
throws RocksDBException
optionsFileName - the RocksDB options file path.env - Env instance.dbOptions - DBOptions instance. This will be
filled and returned.cfDescs - A list of ColumnFamilyDescriptor's be
returned.ignoreUnknownOptions - this flag can be set to true if you want to
ignore options that are from a newer version of the db, esentially for
forward compatibility.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.