public class OptionsUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static String |
getLatestOptionsFileName(String dbPath,
Env env)
Returns the latest options file name under the specified RocksDB path.
|
static void |
loadLatestOptions(ConfigOptions configOptions,
String dbPath,
DBOptions dbOptions,
List<ColumnFamilyDescriptor> cfDescs)
Similar to LoadLatestOptions, this function constructs the DBOptions
and ColumnFamilyDescriptors based on the specified RocksDB Options file.
|
static void |
loadLatestOptions(String dbPath,
Env env,
DBOptions dbOptions,
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(String dbPath,
Env env,
DBOptions dbOptions,
List<ColumnFamilyDescriptor> cfDescs,
boolean ignoreUnknownOptions) |
static void |
loadOptionsFromFile(ConfigOptions configOptions,
String optionsFileName,
DBOptions dbOptions,
List<ColumnFamilyDescriptor> cfDescs)
Similar to LoadLatestOptions, this function constructs the DBOptions
and ColumnFamilyDescriptors based on the specified RocksDB Options file.
|
static void |
loadOptionsFromFile(String optionsFileName,
Env env,
DBOptions dbOptions,
List<ColumnFamilyDescriptor> cfDescs)
Similar to LoadLatestOptions, this function constructs the DBOptions
and ColumnFamilyDescriptors based on the specified RocksDB Options file.
|
static void |
loadOptionsFromFile(String optionsFileName,
Env env,
DBOptions dbOptions,
List<ColumnFamilyDescriptor> cfDescs,
boolean ignoreUnknownOptions) |
public static void loadLatestOptions(String dbPath, Env env, DBOptions dbOptions, 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(String dbPath, Env env, DBOptions dbOptions, 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, essentially for
forward compatibility.RocksDBException - thrown if error happens in underlying
native library.public static void loadLatestOptions(ConfigOptions configOptions, String dbPath, DBOptions dbOptions, 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(String optionsFileName, Env env, DBOptions dbOptions, 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(String optionsFileName, Env env, DBOptions dbOptions, 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 void loadOptionsFromFile(ConfigOptions configOptions, String optionsFileName, DBOptions dbOptions, 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 String getLatestOptionsFileName(String dbPath, Env env) throws RocksDBException
dbPath - the path to the RocksDB.env - Env instance.RocksDBException - thrown if error happens in underlying
native library.Copyright © 2022. All rights reserved.