com.sleepycat.je
Class EnvironmentMutableConfig

java.lang.Object
  extended by com.sleepycat.je.EnvironmentMutableConfig
All Implemented Interfaces:
java.lang.Cloneable
Direct Known Subclasses:
EnvironmentConfig

public class EnvironmentMutableConfig
extends java.lang.Object
implements java.lang.Cloneable

Javadoc for this public class is generated via the doc templates in the doc_src directory.


Field Summary
protected  long cacheSize
           
protected  java.util.Properties props
          Note that in the implementation we choose not to extend Properties in order to keep the configuration type safe.
(package private)  boolean validateParams
          Internal boolean that says whether or not to validate params.
 
Constructor Summary
EnvironmentMutableConfig()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
EnvironmentMutableConfig(java.util.Properties properties)
          Used by EnvironmentConfig to construct from properties.
 
Method Summary
(package private)  void checkImmutablePropsForEquality(EnvironmentMutableConfig passedConfig)
          Check that the immutable values in the environment config used to open an environment match those in the config object saved by the underlying shared EnvironmentImpl.
protected  java.lang.Object clone()
          Overrides Object.clone() to clone all properties, used by this class and EnvironmentConfig.
(package private)  EnvironmentMutableConfig cloneMutableConfig()
          Used by Environment to create a copy of the application supplied configuration.
(package private)  void copyHandlePropsTo(EnvironmentMutableConfig other)
          Copies the per-handle properties of this object to the given config object.
(package private)  void copyMutablePropsTo(EnvironmentMutableConfig toConfig)
          Copies all mutable props to the given config object.
(package private)  void fillInEnvironmentGeneratedProps(EnvironmentImpl envImpl)
          Fill in the properties calculated by the environment to the given config object.
 int getCachePercent()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 long getCacheSize()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 java.lang.String getConfigParam(java.lang.String paramName)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
(package private)  boolean getLoadPropertyFile()
          For unit testing, to prevent loading of je.properties.
(package private)  int getNumExplicitlySetParams()
          Testing support
(package private)  java.util.Properties getProps()
           
 boolean getTxnNoSync()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 boolean getTxnWriteNoSync()
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 void setCachePercent(int percent)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 void setCacheSize(long totalBytes)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 void setConfigParam(java.lang.String paramName, java.lang.String value)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
(package private)  void setLoadPropertyFile(boolean loadPropertyFile)
          For unit testing, to prevent loading of je.properties.
 void setTxnNoSync(boolean noSync)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
 void setTxnWriteNoSync(boolean writeNoSync)
          Javadoc for this public method is generated via the doc templates in the doc_src directory.
(package private)  void setValidateParams(boolean validateParams)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

cacheSize

protected long cacheSize

props

protected java.util.Properties props
Note that in the implementation we choose not to extend Properties in order to keep the configuration type safe.


validateParams

boolean validateParams
Internal boolean that says whether or not to validate params. Setting it to false means that parameter value validatation won't be performed during setVal() calls. Only should be set to false by unit tests using DbInternal.

Constructor Detail

EnvironmentMutableConfig

public EnvironmentMutableConfig()
Javadoc for this public method is generated via the doc templates in the doc_src directory.


EnvironmentMutableConfig

EnvironmentMutableConfig(java.util.Properties properties)
                   throws java.lang.IllegalArgumentException
Used by EnvironmentConfig to construct from properties.

Throws:
java.lang.IllegalArgumentException
Method Detail

setTxnNoSync

public void setTxnNoSync(boolean noSync)
Javadoc for this public method is generated via the doc templates in the doc_src directory.


getTxnNoSync

public boolean getTxnNoSync()
Javadoc for this public method is generated via the doc templates in the doc_src directory.


setTxnWriteNoSync

public void setTxnWriteNoSync(boolean writeNoSync)
Javadoc for this public method is generated via the doc templates in the doc_src directory.


getTxnWriteNoSync

public boolean getTxnWriteNoSync()
Javadoc for this public method is generated via the doc templates in the doc_src directory.


setCacheSize

public void setCacheSize(long totalBytes)
                  throws java.lang.IllegalArgumentException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
java.lang.IllegalArgumentException

getCacheSize

public long getCacheSize()
Javadoc for this public method is generated via the doc templates in the doc_src directory.


setCachePercent

public void setCachePercent(int percent)
                     throws java.lang.IllegalArgumentException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
java.lang.IllegalArgumentException

getCachePercent

public int getCachePercent()
Javadoc for this public method is generated via the doc templates in the doc_src directory.


setConfigParam

public void setConfigParam(java.lang.String paramName,
                           java.lang.String value)
                    throws java.lang.IllegalArgumentException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
java.lang.IllegalArgumentException

getConfigParam

public java.lang.String getConfigParam(java.lang.String paramName)
                                throws java.lang.IllegalArgumentException
Javadoc for this public method is generated via the doc templates in the doc_src directory.

Throws:
java.lang.IllegalArgumentException

setValidateParams

void setValidateParams(boolean validateParams)

checkImmutablePropsForEquality

void checkImmutablePropsForEquality(EnvironmentMutableConfig passedConfig)
                              throws java.lang.IllegalArgumentException
Check that the immutable values in the environment config used to open an environment match those in the config object saved by the underlying shared EnvironmentImpl.

Throws:
java.lang.IllegalArgumentException

clone

protected java.lang.Object clone()
                          throws java.lang.CloneNotSupportedException
Overrides Object.clone() to clone all properties, used by this class and EnvironmentConfig.

Overrides:
clone in class java.lang.Object
Throws:
java.lang.CloneNotSupportedException

cloneMutableConfig

EnvironmentMutableConfig cloneMutableConfig()
Used by Environment to create a copy of the application supplied configuration. Done this way to provide non-public cloning.


copyHandlePropsTo

void copyHandlePropsTo(EnvironmentMutableConfig other)
Copies the per-handle properties of this object to the given config object.


copyMutablePropsTo

void copyMutablePropsTo(EnvironmentMutableConfig toConfig)
Copies all mutable props to the given config object.


fillInEnvironmentGeneratedProps

void fillInEnvironmentGeneratedProps(EnvironmentImpl envImpl)
Fill in the properties calculated by the environment to the given config object.


getProps

java.util.Properties getProps()

setLoadPropertyFile

void setLoadPropertyFile(boolean loadPropertyFile)
For unit testing, to prevent loading of je.properties.


getLoadPropertyFile

boolean getLoadPropertyFile()
For unit testing, to prevent loading of je.properties.


getNumExplicitlySetParams

int getNumExplicitlySetParams()
Testing support


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright 2004,2008 Oracle. All rights reserved.