ConfigurableEnvironment.java revision 29b1cca745810ca5f054aace99379ba6af427e6b
0N/A * The contents of this file are subject to the terms of the 0N/A * Common Development and Distribution License, Version 1.0 only 0N/A * (the "License"). You may not use this file except in compliance 0N/A * You can obtain a copy of the license at 0N/A * See the License for the specific language governing permissions 0N/A * and limitations under the License. 0N/A * When distributing Covered Code, include this CDDL HEADER in each 0N/A * file and include the License file at 0N/A * add the following below this CDDL HEADER, with the fields enclosed 2362N/A * by brackets "[]" replaced with your own identifying information: 2362N/A * Portions Copyright [yyyy] [name of copyright owner] 0N/A * Portions Copyright 2006-2007 Sun Microsystems, Inc. 0N/A * This class maps JE properties to configuration attributes. 0N/A * The name of the attribute which configures the database cache size as a 0N/A * percentage of Java VM heap size. 0N/A * The name of the attribute which configures the database cache size as an 0N/A * approximate number of bytes. 0N/A * The name of the attribute which configures whether data updated by a 0N/A * database transaction is forced to disk. 0N/A * The name of the attribute which configures whether data updated by a 0N/A * database transaction is written from the Java VM to the O/S. 0N/A * The name of the attribute which configures whether the database background 0N/A * cleaner thread runs. 0N/A * The name of the attribute which configures the minimum percentage of log 0N/A * space that must be used in log files. 0N/A * The name of the attribute which configures the maximum size of each 0N/A * individual JE log file, in bytes. 0N/A * The name of the attribute which configures the database cache eviction 0N/A * The name of the attribute which configures the number of nodes in one scan 0N/A * of the database cache evictor. 0N/A * The name of the attribute which configures whether the logging file 0N/A * handler will be on or off. 0N/A * The name of the attribute which configures the trace logging message level. 0N/A * The name of the attribute which configures how many bytes are written to 0N/A * the log before the checkpointer runs. 0N/A * The name of the attribute which configures the amount of time between 0N/A * runs of the checkpointer. "database-checkpointer-wakeup-interval";
* The name of the attribute which configures the number of lock tables. * The name of the attribute which configures the number threads * allocated by the cleaner for log file processing. * A map of JE property names to the corresponding configuration attribute. * A map of configuration attribute names to the corresponding configuration * A map of configuration attribute names to the corresponding configuration * Register a JE property and its corresponding configuration attribute. * @param propertyName The name of the JE property to be registered. * @param attrName The name of the configuration attribute associated * @throws Exception If there is an error in the attribute name. // Strip off NAME_PREFIX_CFG. // Convert hyphenated to camel case. * Get the name of the configuration attribute associated with a JE property. * @param jeProperty The name of the JE property. * @return The name of the associated configuration attribute. * Get the value of a JE property that is mapped to a configuration attribute. * @param cfg The configuration containing the property values. * @param attrName The conriguration attribute type name. * @return The string value of the JE property. // JE durations are in microseconds so we must convert. // Register the parameters that have JE property names. * Create a JE environment configuration with default values. * @return A JE environment config containing default values. // This property was introduced in JE 3.0. Shared latches are now used on // all internal nodes of the b-tree, which increases concurrency for many // This parameter was set to false while diagnosing a Sleepycat bug. // Normally cleansed log files are deleted, but if this is set false // they are instead renamed from .jdb to .del. * Parse a configuration associated with a JE environment and create an * environment config from it. * @param cfg The configuration to be parsed. * @return An environment config instance corresponding to the config entry. * @throws ConfigException If there is an error in the provided configuration // Handle the attributes that do not have a JE property. // Iterate through the config attributes associated with a JE property.