|
|||||||||
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 by the EnvironmentConfig String constants. 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 ReplicatedEnvironment is instantiated. In order to keep replication code out of the base code, replication parameters are loaded by way of the addConfigurations method.
Field Summary | |
---|---|
protected Properties |
props
|
Constructor Summary | |
---|---|
DbConfigManager(EnvironmentConfig config)
|
Method Summary | |
---|---|
static void |
applyFileConfig(File envHome,
Properties props,
boolean forReplication)
Apply the configurations specified in the je.properties file to override the programmatically 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 boolean |
getBooleanVal(Properties props,
BooleanConfigParam param)
Helper method for getting boolean values. |
static String |
getConfigParam(Properties props,
String paramName)
Helper method for environment and replication configuration classes. |
int |
getDuration(DurationConfigParam configParam)
Get this parameter from the environment wide configuration settings. |
static long |
getDurationVal(Properties props,
DurationConfigParam param,
TimeUnit unit)
Helper method for getting duration values. |
EnvironmentConfig |
getEnvironmentConfig()
|
int |
getInt(IntConfigParam configParam)
Get this parameter from the environment wide configuration settings. |
static int |
getIntVal(Properties props,
IntConfigParam param)
Helper method for getting integer values. |
long |
getLong(LongConfigParam configParam)
Get this parameter from the environment wide configuration settings. |
short |
getShort(ShortConfigParam configParam)
Get this parameter from the environment wide configuration settings. |
static String |
getVal(Properties props,
ConfigParam param)
Helper method for environment and replication configuration classes. |
static String |
getVal(Properties props,
ConfigParam param,
String paramName)
Helper method for environment and replication configuration classes. |
static void |
setBooleanVal(Properties props,
BooleanConfigParam param,
boolean val,
boolean validateValue)
Helper method for setting boolean values. |
static void |
setConfigParam(Properties props,
String paramName,
String value,
boolean requireMutability,
boolean validateValue,
boolean forReplication,
boolean verifyForReplication)
Helper method for environment and replication configuration classes. |
static void |
setDurationVal(Properties props,
DurationConfigParam param,
long val,
TimeUnit unit,
boolean validateValue)
Helper method for setting duration values. |
static void |
setIntVal(Properties props,
IntConfigParam param,
int val,
boolean validateValue)
Helper method for setting integer values. |
static void |
setVal(Properties props,
ConfigParam param,
String val,
boolean validateValue)
Helper method for environment and replication configuration classes. |
static void |
setVal(Properties props,
ConfigParam param,
String paramName,
String val,
boolean validateValue)
Helper method for environment and replication configuration classes. |
static void |
validateProperties(Properties props,
boolean isRepConfigInstance,
String configClassName)
Validate a collection of configurations, checking that - the name and value are valid - a replication param is not being set through an EnvironmentConfig class, and a non-rep param is not set through a ReplicationConfig instance. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Properties props
Constructor Detail |
---|
public DbConfigManager(EnvironmentConfig config)
Method Detail |
---|
public EnvironmentConfig getEnvironmentConfig()
public String get(ConfigParam configParam)
configParam
-
public String get(String configParamName)
configParam
-
public boolean getBoolean(BooleanConfigParam configParam)
configParam
-
public short getShort(ShortConfigParam configParam)
configParam
-
public int getInt(IntConfigParam configParam)
configParam
-
public long getLong(LongConfigParam configParam)
configParam
-
public int getDuration(DurationConfigParam configParam)
configParam
-
public static void validateProperties(Properties props, boolean isRepConfigInstance, String configClassName) throws IllegalArgumentException
IllegalArgumentException
- via XxxConfig(Properties) ctor.public static void applyFileConfig(File envHome, Properties props, boolean forReplication) throws IllegalArgumentException
IllegalArgumentException
- via XxxConfig(Properties) ctor.public static void setConfigParam(Properties props, String paramName, String value, boolean requireMutability, boolean validateValue, boolean forReplication, boolean verifyForReplication) throws IllegalArgumentException
props
- Property bag held within the configuration object.
IllegalArgumentException
- via XxxConfig.setXxx methods and
XxxConfig(Properties) ctor.public static String getConfigParam(Properties props, String paramName) throws IllegalArgumentException
props
- Property bag held within the configuration object.
IllegalArgumentException
- via XxxConfig.getConfigParam.public static String getVal(Properties props, ConfigParam param)
public static String getVal(Properties props, ConfigParam param, String paramName)
public static void setVal(Properties props, ConfigParam param, String val, boolean validateValue) throws IllegalArgumentException
IllegalArgumentException
public static void setVal(Properties props, ConfigParam param, String paramName, String val, boolean validateValue) throws IllegalArgumentException
IllegalArgumentException
public static int getIntVal(Properties props, IntConfigParam param)
public static void setIntVal(Properties props, IntConfigParam param, int val, boolean validateValue)
public static boolean getBooleanVal(Properties props, BooleanConfigParam param)
public static void setBooleanVal(Properties props, BooleanConfigParam param, boolean val, boolean validateValue)
public static long getDurationVal(Properties props, DurationConfigParam param, TimeUnit unit)
public static void setDurationVal(Properties props, DurationConfigParam param, long val, TimeUnit unit, boolean validateValue)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |