|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sleepycat.je.dbi.DbConfigManager
public class DbConfigManager
DbConfigManager holds the configuration parameters for an environment. In general, all configuration parameters are represented by a ConfigParam defined in com.sleepycat.je.config.EnvironmentParams and can be represented by a property described in the top level example.properties. Environment parameters have some interesting twists because there are some attributes that are scoped by handle, such as the commit durability (txnSync, txnNoSync, etc) parameters. DbConfigManager is instantiated first by the EnvironmentImpl, and is loaded with the base configuration parameters. If replication is enabled, additional properties are added when the Replicator is instantiated. In order to keep replication code out of the base code, replication parameters are loaded by way of the addConfigurations method.
Constructor Summary | |
---|---|
DbConfigManager(EnvironmentConfig config)
|
Method Summary | |
---|---|
void |
addConfigurations(Properties additionalProps)
Add all configuration properties in the specified property bag to this environment's configuration. |
static void |
applyFileConfig(File envHome,
Properties props,
boolean forReplication,
String errorClassName)
Apply the configurations specified in the je.properties file to override the programatically set configuration values held in the property bag. |
String |
get(ConfigParam configParam)
Get this parameter from the environment wide configuration settings. |
String |
get(String configParamName)
Get this parameter from the environment wide configuration settings. |
boolean |
getBoolean(BooleanConfigParam configParam)
Get this parameter from the environment wide configuration settings. |
static String |
getConfigParam(Properties props,
String paramName)
Helper method for environment and replicator configuration classes. |
EnvironmentConfig |
getEnvironmentConfig()
|
int |
getInt(IntConfigParam configParam)
Get this parameter from the environment wide configuration settings. |
long |
getLong(LongConfigParam configParam)
Get this parameter from the environment wide configuration settings. |
static String |
getVal(Properties props,
ConfigParam param)
Helper method for environment and replicator configuration classes. |
static void |
setConfigParam(Properties props,
String paramName,
String value,
boolean requireMutability,
boolean validateValue,
boolean forReplication)
Helper method for environment and replicator configuration classes. |
static void |
setVal(Properties props,
ConfigParam param,
String val,
boolean validateValue)
Helper method for environment and replicator configuration classes. |
static void |
validateProperties(Properties props,
boolean forReplication,
String configClassName)
Validate a collection of configurations at Environment and Replicator startup time. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DbConfigManager(EnvironmentConfig config) throws DbConfigException
DbConfigException
Method Detail |
---|
public void addConfigurations(Properties additionalProps)
public EnvironmentConfig getEnvironmentConfig()
public String get(ConfigParam configParam) throws IllegalArgumentException
configParam
-
IllegalArgumentException
public String get(String configParamName) throws IllegalArgumentException
configParam
-
IllegalArgumentException
public boolean getBoolean(BooleanConfigParam configParam) throws DatabaseException
configParam
-
DatabaseException
public int getInt(IntConfigParam configParam) throws DatabaseException
configParam
-
DatabaseException
public long getLong(LongConfigParam configParam) throws DatabaseException
configParam
-
DatabaseException
public static void validateProperties(Properties props, boolean forReplication, String configClassName) throws IllegalArgumentException
IllegalArgumentException
public static void applyFileConfig(File envHome, Properties props, boolean forReplication, String errorClassName) throws IllegalArgumentException
IllegalArgumentException
public static void setConfigParam(Properties props, String paramName, String value, boolean requireMutability, boolean validateValue, boolean forReplication) throws IllegalArgumentException
props
- Property bag held within the configuration object.
IllegalArgumentException
public static String getConfigParam(Properties props, String paramName) throws IllegalArgumentException
props
- Property bag held within the configuration object.
IllegalArgumentException
public static String getVal(Properties props, ConfigParam param)
public static void setVal(Properties props, ConfigParam param, String val, boolean validateValue) throws IllegalArgumentException
IllegalArgumentException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |