ify no-sync behavior for a given handle. EnvironmentMutableConfig mutableConfig = myEnvHandle.getMutableConfig(); mutableConfig.setTxnNoSync(true); myEnvHandle.setMutableConfig(mutableConfig);
The per-environment handle properties are listed below. These properties are accessed using the setter and getter methods listed, as shown in the example above.
- {@link #setDurability}, {@link #getDurability}
- {@link #setTxnNoSync}, {@link #getTxnNoSync} deprecated
- {@link #setTxnWriteNoSync}, {@link #getTxnWriteNoSync} deprecated
Environment-Wide Mutable Properties
Environment-wide mutable properties are those that can be changed for an environment as a whole, irrespective of which environment instance (for the same physical environment) is used. For example, to stop the cleaner daemon thread, do this:
// Stop the cleaner daemon thread for the environment. EnvironmentMutableConfig mutableConfig = myEnvHandle.getMutableConfig(); mutableConfig.setConfigParam("je.env.runCleaner", "false"); myEnvHandle.setMutableConfig(mutableConfig);
The environment-wide mutable properties are listed below. These properties are accessed using the {@link #setConfigParam} and {@link #getConfigParam} methods, as shown in the example above, using the propertynames listed below. In some cases setter and getter methods are also available.
- je.maxMemory ( {@link #setCacheSize}, {@link #getCacheSize})
- je.maxMemoryPercent ( {@link #setCachePercent}, {@link #getCachePercent})
- je.env.runINCompressor
- je.env.runEvictor
- je.env.runCheckpointer
- je.env.runCleaner
Getting the Current Environment Properties
To get the current "live" properties of an environment after constructing it or changing its properties, you must call {@link Environment#getConfig} or{@link Environment#getMutableConfig}. The original EnvironmentConfig or EnvironmentMutableConfig object used to set the properties is not kept up to date as properties are changed, and does not reflect property validation or properties that are computed. @see EnvironmentConfig