org.opends.server.backends.jeb
Class ConfigurableEnvironment

java.lang.Object
  extended by org.opends.server.backends.jeb.ConfigurableEnvironment

public class ConfigurableEnvironment
extends java.lang.Object

This class maps JE properties to configuration attributes.


Field Summary
static java.lang.String ATTR_CHECKPOINTER_BYTES_INTERVAL
          The name of the attribute which configures how many bytes are written to the log before the checkpointer runs.
static java.lang.String ATTR_CHECKPOINTER_WAKEUP_INTERVAL
          The name of the attribute which configures the amount of time between runs of the checkpointer.
static java.lang.String ATTR_CLEANER_MIN_UTILIZATION
          The name of the attribute which configures the minimum percentage of log space that must be used in log files.
static java.lang.String ATTR_DATABASE_CACHE_PERCENT
          The name of the attribute which configures the database cache size as a percentage of Java VM heap size.
static java.lang.String ATTR_DATABASE_CACHE_SIZE
          The name of the attribute which configures the database cache size as an approximate number of bytes.
static java.lang.String ATTR_DATABASE_LOG_FILE_MAX
          The name of the attribute which configures the maximum size of each individual JE log file, in bytes.
static java.lang.String ATTR_DATABASE_RUN_CLEANER
          The name of the attribute which configures whether the database background cleaner thread runs.
static java.lang.String ATTR_DATABASE_TXN_NO_SYNC
          The name of the attribute which configures whether data updated by a database transaction is forced to disk.
static java.lang.String ATTR_DATABASE_TXN_WRITE_NO_SYNC
          The name of the attribute which configures whether data updated by a database transaction is written from the Java VM to the O/S.
static java.lang.String ATTR_EVICTOR_LRU_ONLY
          The name of the attribute which configures the database cache eviction algorithm.
static java.lang.String ATTR_EVICTOR_NODES_PER_SCAN
          The name of the attribute which configures the number of nodes in one scan of the database cache evictor.
static java.lang.String ATTR_JE_PROPERTY
          The name of the attribute which may specify any native JE properties.
static java.lang.String ATTR_LOGGING_FILE_HANDLER_ON
          The name of the attribute which configures whether the logging file handler will be on or off.
static java.lang.String ATTR_LOGGING_LEVEL
          The name of the attribute which configures the trace logging message level.
static java.lang.String ATTR_NUM_CLEANER_THREADS
          The name of the attribute which configures the number threads allocated by the cleaner for log file processing.
static java.lang.String ATTR_NUM_LOCK_TABLES
          The name of the attribute which configures the number of lock tables.
 
Constructor Summary
ConfigurableEnvironment()
           
 
Method Summary
static com.sleepycat.je.EnvironmentConfig defaultConfig()
          Create a JE environment configuration with default values.
static java.lang.String getAttributeForProperty(java.lang.String jeProperty)
          Get the name of the configuration attribute associated with a JE property.
static com.sleepycat.je.EnvironmentConfig parseConfigEntry(LocalDBBackendCfg cfg)
          Parse a configuration associated with a JE environment and create an environment config from it.
static com.sleepycat.je.EnvironmentConfig setJEProperties(com.sleepycat.je.EnvironmentConfig envConfig, java.util.SortedSet<java.lang.String> jeProperties, java.util.HashMap<java.lang.String,java.lang.String> configAttrMap)
          Parse, validate and set native JE environment properties for a given environment config.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ATTR_DATABASE_CACHE_PERCENT

public static final java.lang.String ATTR_DATABASE_CACHE_PERCENT
The name of the attribute which configures the database cache size as a percentage of Java VM heap size.

See Also:
Constant Field Values

ATTR_DATABASE_CACHE_SIZE

public static final java.lang.String ATTR_DATABASE_CACHE_SIZE
The name of the attribute which configures the database cache size as an approximate number of bytes.

See Also:
Constant Field Values

ATTR_DATABASE_TXN_NO_SYNC

public static final java.lang.String ATTR_DATABASE_TXN_NO_SYNC
The name of the attribute which configures whether data updated by a database transaction is forced to disk.

See Also:
Constant Field Values

ATTR_DATABASE_TXN_WRITE_NO_SYNC

public static final java.lang.String ATTR_DATABASE_TXN_WRITE_NO_SYNC
The name of the attribute which configures whether data updated by a database transaction is written from the Java VM to the O/S.

See Also:
Constant Field Values

ATTR_DATABASE_RUN_CLEANER

public static final java.lang.String ATTR_DATABASE_RUN_CLEANER
The name of the attribute which configures whether the database background cleaner thread runs.

See Also:
Constant Field Values

ATTR_CLEANER_MIN_UTILIZATION

public static final java.lang.String ATTR_CLEANER_MIN_UTILIZATION
The name of the attribute which configures the minimum percentage of log space that must be used in log files.

See Also:
Constant Field Values

ATTR_DATABASE_LOG_FILE_MAX

public static final java.lang.String ATTR_DATABASE_LOG_FILE_MAX
The name of the attribute which configures the maximum size of each individual JE log file, in bytes.

See Also:
Constant Field Values

ATTR_EVICTOR_LRU_ONLY

public static final java.lang.String ATTR_EVICTOR_LRU_ONLY
The name of the attribute which configures the database cache eviction algorithm.

See Also:
Constant Field Values

ATTR_EVICTOR_NODES_PER_SCAN

public static final java.lang.String ATTR_EVICTOR_NODES_PER_SCAN
The name of the attribute which configures the number of nodes in one scan of the database cache evictor.

See Also:
Constant Field Values

ATTR_LOGGING_FILE_HANDLER_ON

public static final java.lang.String ATTR_LOGGING_FILE_HANDLER_ON
The name of the attribute which configures whether the logging file handler will be on or off.

See Also:
Constant Field Values

ATTR_LOGGING_LEVEL

public static final java.lang.String ATTR_LOGGING_LEVEL
The name of the attribute which configures the trace logging message level.

See Also:
Constant Field Values

ATTR_CHECKPOINTER_BYTES_INTERVAL

public static final java.lang.String ATTR_CHECKPOINTER_BYTES_INTERVAL
The name of the attribute which configures how many bytes are written to the log before the checkpointer runs.

See Also:
Constant Field Values

ATTR_CHECKPOINTER_WAKEUP_INTERVAL

public static final java.lang.String ATTR_CHECKPOINTER_WAKEUP_INTERVAL
The name of the attribute which configures the amount of time between runs of the checkpointer.

See Also:
Constant Field Values

ATTR_NUM_LOCK_TABLES

public static final java.lang.String ATTR_NUM_LOCK_TABLES
The name of the attribute which configures the number of lock tables.

See Also:
Constant Field Values

ATTR_NUM_CLEANER_THREADS

public static final java.lang.String ATTR_NUM_CLEANER_THREADS
The name of the attribute which configures the number threads allocated by the cleaner for log file processing.

See Also:
Constant Field Values

ATTR_JE_PROPERTY

public static final java.lang.String ATTR_JE_PROPERTY
The name of the attribute which may specify any native JE properties.

See Also:
Constant Field Values
Constructor Detail

ConfigurableEnvironment

public ConfigurableEnvironment()
Method Detail

getAttributeForProperty

public static java.lang.String getAttributeForProperty(java.lang.String jeProperty)
Get the name of the configuration attribute associated with a JE property.

Parameters:
jeProperty - The name of the JE property.
Returns:
The name of the associated configuration attribute.

defaultConfig

public static com.sleepycat.je.EnvironmentConfig defaultConfig()
Create a JE environment configuration with default values.

Returns:
A JE environment config containing default values.

parseConfigEntry

public static com.sleepycat.je.EnvironmentConfig parseConfigEntry(LocalDBBackendCfg cfg)
                                                           throws ConfigException
Parse a configuration associated with a JE environment and create an environment config from it.

Parameters:
cfg - The configuration to be parsed.
Returns:
An environment config instance corresponding to the config entry.
Throws:
ConfigException - If there is an error in the provided configuration entry.

setJEProperties

public static com.sleepycat.je.EnvironmentConfig setJEProperties(com.sleepycat.je.EnvironmentConfig envConfig,
                                                                 java.util.SortedSet<java.lang.String> jeProperties,
                                                                 java.util.HashMap<java.lang.String,java.lang.String> configAttrMap)
                                                          throws ConfigException
Parse, validate and set native JE environment properties for a given environment config.

Parameters:
envConfig - The JE environment config for which to set the properties.
jeProperties - The JE environment properties to parse, validate and set.
configAttrMap - Component supported JE properties to their configuration attributes map.
Returns:
An environment config instance with given properties set.
Throws:
ConfigException - If there is an error while parsing, validating and setting any of the properties provided.