|
|||||||||
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(java.util.Properties additionalProps)
Add all configuration properties in the specified property bag to this environment's configuration. |
static void |
applyFileConfig(java.io.File envHome,
java.util.Properties props,
boolean forReplication,
java.lang.String errorClassName)
Apply the configurations specified in the je.properties file to override the programatically set configuration values held in the property bag. |
java.lang.String |
get(ConfigParam configParam)
Get this parameter from the environment wide configuration settings. |
java.lang.String |
get(java.lang.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 java.lang.String |
getConfigParam(java.util.Properties props,
java.lang.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 java.lang.String |
getVal(java.util.Properties props,
ConfigParam param)
Helper method for environment and replicator configuration classes. |
static void |
setConfigParam(java.util.Properties props,
java.lang.String paramName,
java.lang.String value,
boolean requireMutability,
boolean validateValue,
boolean forReplication)
Helper method for environment and replicator configuration classes. |
static void |
setVal(java.util.Properties props,
ConfigParam param,
java.lang.String val,
boolean validateValue)
Helper method for environment and replicator configuration classes. |
static void |
validateProperties(java.util.Properties props,
boolean forReplication,
java.lang.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(java.util.Properties additionalProps)
public EnvironmentConfig getEnvironmentConfig()
public java.lang.String get(ConfigParam configParam) throws java.lang.IllegalArgumentException
configParam
-
java.lang.IllegalArgumentException
public java.lang.String get(java.lang.String configParamName) throws java.lang.IllegalArgumentException
configParam
-
java.lang.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(java.util.Properties props, boolean forReplication, java.lang.String configClassName) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static void applyFileConfig(java.io.File envHome, java.util.Properties props, boolean forReplication, java.lang.String errorClassName) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
public static void setConfigParam(java.util.Properties props, java.lang.String paramName, java.lang.String value, boolean requireMutability, boolean validateValue, boolean forReplication) throws java.lang.IllegalArgumentException
props
- Property bag held within the configuration object.
java.lang.IllegalArgumentException
public static java.lang.String getConfigParam(java.util.Properties props, java.lang.String paramName) throws java.lang.IllegalArgumentException
props
- Property bag held within the configuration object.
java.lang.IllegalArgumentException
public static java.lang.String getVal(java.util.Properties props, ConfigParam param)
public static void setVal(java.util.Properties props, ConfigParam param, java.lang.String val, boolean validateValue) throws java.lang.IllegalArgumentException
java.lang.IllegalArgumentException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |