public class EnvironmentConfig extends AbstractConfig
EnvironmentConfig has the same settings as DEFAULT.
As a rule, the EnvironmentConfig instance is created along with the Environment one.
E.g., creation of Environment with some tuned garbage collector settings can look as follows:
final EnvironmentConfig config = new EnvironmentConfig();
final Environment env = Environments.newInstance(""dbDirectory", config.setGcFileMinAge(3).setGcRunPeriod(60000));
Some setting are mutable at runtime and some are immutable. Immutable at runtime settings can be changed, but they
won't take effect on the Environment instance. Those settings are applicable only during
Environment instance creation.
Some settings can be changed only before the database is physically created on storage device. E.g.,
LOG_FILE_SIZE defines the size of a single Log file (.xd file) which cannot be changed for
existing databases. It makes sense to choose values of such settings at design time and hardcode them.
You can define custom processing of changed settings values by AbstractConfig.addChangedSettingsListener(ConfigSettingChangeListener). Override ConfigSettingChangeListener.beforeSettingChanged(String, Object, Map) to pre-process mutations of settings and ConfigSettingChangeListener.afterSettingChanged(String, Object, Map) to post-process them.
Environment,
Environment.getEnvironmentConfig()| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CIPHER_BASIC_IV
Defines basic IV (initialization vector) which will be used to encrypt the database.
|
static java.lang.String |
CIPHER_ID
Defines id of StreamCipherProvider which will be used to encrypt the database.
|
static java.lang.String |
CIPHER_KEY
Defines the key which will be used to encrypt the database.
|
static EnvironmentConfig |
DEFAULT |
static java.lang.String |
ENV_CLOSE_FORCEDLY
If is set to
true then Environment.close() doest't check if there are unfinished
transactions. |
static java.lang.String |
ENV_COMPACT_ON_OPEN
If is set to
true then the Environment will compact itself on opening. |
static java.lang.String |
ENV_FAIL_FAST_IN_READONLY
If is set to
true and ENV_IS_READONLY is also true then the Environment
obligatorily creates transactions for which Transaction.isReadonly() is true. |
static java.lang.String |
ENV_GATHER_STATISTICS
If is set to
true then the Environment gathers statistics. |
static java.lang.String |
ENV_IS_READONLY
If is set to
true then the Environment instance is read-only. |
static java.lang.String |
ENV_MAX_PARALLEL_READONLY_TXNS
Deprecated.
|
static java.lang.String |
ENV_MAX_PARALLEL_TXNS
Defines the number of transactions that can be started in parallel.
|
static java.lang.String |
ENV_MONITOR_TXNS_CHECK_FREQ
If ENV_MONITOR_TXNS_TIMEOUT is non-zero then stuck transactions monitor starts and checks
Environment's transactions with this frequency (period) specified in milliseconds.
|
static java.lang.String |
ENV_MONITOR_TXNS_EXPIRATION_TIMEOUT
Defines Transaction expiration timeout in milliseconds.
|
static java.lang.String |
ENV_MONITOR_TXNS_TIMEOUT
Defines Transaction timeout in milliseconds.
|
static java.lang.String |
ENV_READONLY_EMPTY_STORES
If is set to
true and ENV_IS_READONLY is also true then
Environment.openStore(String, StoreConfig, Transaction) doesn't try to create a Store,
but returns an empty immutable instance instead. |
static java.lang.String |
ENV_STOREGET_CACHE_MAX_VALUE_SIZE |
static java.lang.String |
ENV_STOREGET_CACHE_MIN_TREE_SIZE |
static java.lang.String |
ENV_STOREGET_CACHE_SIZE
Defines the size of the "store-get" cache.
|
static java.lang.String |
ENV_TXN_DOWNGRADE_AFTER_FLUSH
|
static java.lang.String |
ENV_TXN_REPLAY_MAX_COUNT
Defines the number of times which a Transaction can try to flush without attempts to upgrade
(switch to an exclusive mode).
|
static java.lang.String |
ENV_TXN_REPLAY_TIMEOUT
Defines the number of millisecond which a Transaction can try to flush without attempts to upgrade
(switch to an exclusive mode).
|
static java.lang.String |
ENV_TXN_SINGLE_THREAD_WRITES
If is set to
true then any write operation can be performed only in the thread which
the transaction was created in. |
static java.lang.String |
ENV_TXN_TRACE_FINISH
If is set to
true then each transaction, read/write or read-only, saves stack trace
when it is finished (aborted or committed). |
static java.lang.String |
GC_ENABLED
If is set to
true then the database garbage collector is enabled. |
static java.lang.String |
GC_FILES_DELETION_DELAY
Defines the number of milliseconds which deletion of any successfully cleaned
Log file (.xd file)
is postponed for. |
static java.lang.String |
GC_FILES_INTERVAL
Deprecated.
|
static java.lang.String |
GC_MIN_FILE_AGE
Defines the minimum age of a
Log file (.xd file) to consider it for cleaning by the database garbage
collector. |
static java.lang.String |
GC_MIN_UTILIZATION
Defines percent of minimum database utilization.
|
static java.lang.String |
GC_RENAME_FILES
If is set to
true the database garbage collector renames files rather than deletes them. |
static java.lang.String |
GC_RUN_EVERY
If set to nonzero value, GC is forced every this number of seconds.
|
static java.lang.String |
GC_RUN_PERIOD
Defines the number of milliseconds after which background cleaning cycle (single run of the database garbage
collector) can be repeated if the previous one didn't reach required utilization.
|
static java.lang.String |
GC_START_IN
Defines the number of milliseconds which the database garbage collector is postponed for after the
Environment is created.
|
static java.lang.String |
GC_TRANSACTION_ACQUIRE_TIMEOUT
Defines timeout in milliseconds which is used by the database garbage collector to acquire exclusive
Transaction for its purposes if GC_USE_EXCLUSIVE_TRANSACTION is
true. |
static java.lang.String |
GC_TRANSACTION_TIMEOUT
Defines timeout in milliseconds which is used by the database garbage collector to reclaim non-expired data
in several files inside single GC Transaction acquired exclusively.
|
static java.lang.String |
GC_USE_EXCLUSIVE_TRANSACTION
If is set to
true the database garbage collector tries to acquire exclusive Transaction
for its purposes. |
static java.lang.String |
GC_USE_EXPIRATION_CHECKER
Deprecated.
|
static java.lang.String |
GC_UTILIZATION_FROM_FILE
If is not empty, defines full path to the file with stored utilization.
|
static java.lang.String |
GC_UTILIZATION_FROM_SCRATCH
If is set to
true then database utilization will be computed from scratch before the first cleaning
cycle (single run of the database garbage collector) is triggered, i.e. |
static java.lang.String |
LOG_ALLOW_RAM_DISK
For DataReaderWriterProvider.DEFAULT_READER_WRITER_PROVIDER used as DataReaderWriterProvider service provider interface implementation, if is set to
true
then the database can be opened on RAM-disk. |
static java.lang.String |
LOG_ALLOW_REMOTE
For DataReaderWriterProvider.DEFAULT_READER_WRITER_PROVIDER used as DataReaderWriterProvider service provider interface implementation, if is set to
true
then the database can be opened on a remote storage. |
static java.lang.String |
LOG_ALLOW_REMOVABLE
For DataReaderWriterProvider.DEFAULT_READER_WRITER_PROVIDER used as DataReaderWriterProvider service provider interface implementation, if is set to
true
then the database can be opened on a removable storage. |
static java.lang.String |
LOG_CACHE_FREE_PHYSICAL_MEMORY_THRESHOLD
If LOG_CACHE_USE_NIO is
true defines the minimum size in bytes of free physical memory
maintained by the cache memory-mapped files on the host where the JVM runs. |
static java.lang.String |
LOG_CACHE_GENERATION_COUNT
Defines the number of generations of non-blocking LogCache.
|
static java.lang.String |
LOG_CACHE_NON_BLOCKING
If is set to
true the LogCache uses lock-free data structures. |
static java.lang.String |
LOG_CACHE_OPEN_FILES
Defines the maximum number of open files that LogCache maintains in order to reduce system calls to open and
close files.
|
static java.lang.String |
LOG_CACHE_PAGE_SIZE
Defines the size in bytes of a single page (byte array) in the LogCache.
|
static java.lang.String |
LOG_CACHE_READ_AHEAD_MULTIPLE
Defines the number of successive pages to be read at once in case of LogCache miss.
|
static java.lang.String |
LOG_CACHE_SHARED
If is set to
true the LogCache is shared. |
static java.lang.String |
LOG_CACHE_USE_NIO
If is set to
true any immutable file can be mapped in memory provided there is enough physical memory. |
static java.lang.String |
LOG_CACHE_USE_SOFT_REFERENCES
If is set to
true LogCache uses soft references for
holding cached pages. |
static java.lang.String |
LOG_CACHE_WARMUP
If is set to
true LogCache will populate itself with database file pages right after the database is
opened using this EnvironmentConfig instance. |
static java.lang.String |
LOG_CLEAN_DIRECTORY_EXPECTED
If is set to
true then the Log constructor fails if the database directory is not clean. |
static java.lang.String |
LOG_CLEAR_INVALID
If is set to
true then the Log constructor implicitly clears the database if it occurred to be invalid
when opened. |
static java.lang.String |
LOG_DATA_READER_WRITER_PROVIDER
Defines fully-qualified name of the DataReaderWriterProvider service provider interface implementation which
will be used to create DataReader and DataWriter instances.
|
static java.lang.String |
LOG_DURABLE_WRITE
If is set to
true forces file system's fsync call after each committed or flushed transaction. |
static java.lang.String |
LOG_FILE_SIZE
Defines the maximum size in kilobytes of a single
Log file (.xd file). |
static java.lang.String |
LOG_FULL_FILE_READ_ONLY
If is set to
true then each complete and immutable Log file (.xd file) is marked with read-only
attribute. |
static java.lang.String |
LOG_LOCK_ID
Defines the debug identifier to be written to the lock file alongside with other debug information.
|
static java.lang.String |
LOG_LOCK_TIMEOUT
Defines the number of milliseconds the Log constructor waits for the lock file.
|
static java.lang.String |
LOG_SYNC_PERIOD
Sets the period in milliseconds to force file system's fsync call that often if LOG_DURABLE_WRITE
is switched off.
|
static java.lang.String |
MANAGEMENT_ENABLED
If is set to
true then the Environment exposes two JMX managed beans. |
static java.lang.String |
MANAGEMENT_OPERATIONS_RESTRICTED
If is set to
true then exposed JMX managed beans cannot have operations. |
static java.lang.String |
MEMORY_USAGE
Defines absolute value of memory in bytes that can be used by the LogCache.
|
static java.lang.String |
MEMORY_USAGE_PERCENTAGE
Defines percent of max memory (specified by the "-Xmx" java parameter) that can be used by the LogCache.
|
static java.lang.String |
META_SERVER
If set to some value different from
null, expose created environment via given server. |
static java.lang.String |
PROFILER_ENABLED
If is set to
true database profiler is enabled. |
static java.lang.String |
TREE_DUP_MAX_PAGE_SIZE
Defines the maximum size of page of duplicates sub-B+Tree.
|
static java.lang.String |
TREE_MAX_PAGE_SIZE
Defines the maximum size of page of B+Tree.
|
static java.lang.String |
TREE_NODES_CACHE_SIZE
Deprecated.
|
static java.lang.String |
USE_VERSION1_FORMAT |
| Constructor and Description |
|---|
EnvironmentConfig() |
EnvironmentConfig(@NotNull ConfigurationStrategy strategy) |
| Modifier and Type | Method and Description |
|---|---|
long |
getCipherBasicIV()
Returns basic IV (initialization vector) which will be used to encrypt the database.
|
@Nullable java.lang.String |
getCipherId()
Returns id of StreamCipherProvider which will be used to encrypt the database.
|
@Nullable byte[] |
getCipherKey()
Returns the key which will be used to encrypt the database or
null for no encryption. |
boolean |
getEnvCloseForcedly()
Returns
true if Environment.close() shouldn't check if there are unfinished
transactions. |
boolean |
getEnvCompactOnOpen()
Returns
true if the Environment will compact itself on opening. |
boolean |
getEnvFailFastInReadonly()
If is set to
true and ENV_IS_READONLY is also true then the Environment
obligatorily creates transactions for which Transaction.isReadonly() is true. |
boolean |
getEnvGatherStatistics()
Returns
true if the Environment gathers statistics. |
boolean |
getEnvIsReadonly()
Returns
true if the Environment instance is read-only. |
int |
getEnvMaxParallelReadonlyTxns()
Deprecated.
|
int |
getEnvMaxParallelTxns()
Returns the number of transactions that can be started in parallel.
|
int |
getEnvMonitorTxnsCheckFreq()
If ENV_MONITOR_TXNS_TIMEOUT is non-zero then stuck transactions monitor starts and checks
Environment's transactions with this frequency (period) specified in milliseconds.
|
int |
getEnvMonitorTxnsExpirationTimeout()
Defines Transaction expiration timeout in milliseconds.
|
int |
getEnvMonitorTxnsTimeout()
Returns Transaction timeout in milliseconds.
|
boolean |
getEnvReadonlyEmptyStores()
If is set to
true and ENV_IS_READONLY is also true then
Environment.openStore(String, StoreConfig, Transaction) doesn't try to create a Store,
but returns an empty immutable instance instead. |
int |
getEnvStoreGetCacheMaxValueSize() |
int |
getEnvStoreGetCacheMinTreeSize() |
int |
getEnvStoreGetCacheSize()
Returns the size of the "store-get" cache.
|
boolean |
getEnvTxnDowngradeAfterFlush()
|
int |
getEnvTxnReplayMaxCount()
Returns the number of times which a Transaction can try to flush without attempts to upgrade
(switch to an exclusive mode).
|
long |
getEnvTxnReplayTimeout()
Returns the number of millisecond which a Transaction can try to flush without attempts to upgrade
(switch to an exclusive mode).
|
boolean |
getEnvTxnSingleThreadWrites()
If is set to
true then any write operation can be performed only in the thread which
the transaction was created in. |
int |
getGcFileMinAge()
Returns the minimum age of a
Log file (.xd file) to consider it for cleaning by the database garbage
collector. |
int |
getGcFilesDeletionDelay()
Returns the number of milliseconds which deletion of any successfully cleaned
Log file (.xd file)
is postponed for. |
int |
getGcFilesInterval()
Deprecated.
|
int |
getGcMinUtilization()
Returns percent of minimum database utilization.
|
boolean |
getGcRenameFiles()
If returns
true the database garbage collector renames files rather than deletes them. |
int |
getGcRunEvery()
GC is forced every this number of seconds.
|
int |
getGcRunPeriod()
Returns the number of milliseconds after which background cleaning cycle (single run of the database garbage
collector) can be repeated if the previous one didn't reach required utilization.
|
int |
getGcStartIn()
Returns the number of milliseconds which the database garbage collector is postponed for after the
Environment is created.
|
int |
getGcTransactionAcquireTimeout()
Returns timeout in milliseconds which is used by the database garbage collector to acquire exclusive
Transaction for its purposes if GC_USE_EXCLUSIVE_TRANSACTION is
true. |
int |
getGcTransactionTimeout()
Returns timeout in milliseconds which is used by the database garbage collector to reclaim non-expired data
in several files inside single GC Transaction acquired exclusively.
|
boolean |
getGcUseExclusiveTransaction()
Returns
true if the database garbage collector tries to acquire exclusive Transaction
for its purposes. |
boolean |
getGcUseExpirationChecker()
Deprecated.
|
java.lang.String |
getGcUtilizationFromFile()
Returns full path to the file with stored utilization.
|
boolean |
getGcUtilizationFromScratch()
Returns
true if database utilization will be computed from scratch before the first cleaning
cycle (single run of the database garbage collector) is triggered, i.e. |
long |
getLogCacheFreePhysicalMemoryThreshold()
If LOG_CACHE_USE_NIO is
true defines the minimum size in bytes of free physical memory
maintained by the cache memory-mapped files on the host where the JVM runs. |
int |
getLogCacheGenerationCount()
Returns the number of generations of non-blocking LogCache.
|
int |
getLogCacheOpenFilesCount()
Returns the maximum number of open files that the LogCache maintains in order to reduce system calls to open and
close files.
|
int |
getLogCachePageSize()
Returns the size in bytes of a single page (byte array) in the LogCache.
|
int |
getLogCacheReadAheadMultiple()
Returns the number of successive pages to be read at once in case of LogCache miss.
|
boolean |
getLogCacheUseNio()
Returns
true if any immutable .xd file can be mapped in memory provided there is enough physical memory. |
boolean |
getLogCacheUseSoftReferences()
Returns
true LogCache uses soft references for
holding cached pages. |
boolean |
getLogCacheWarmup()
Returns
true if LogCache will populate itself with database file pages right after the database is
opened using this EnvironmentConfig instance. |
java.lang.String |
getLogDataReaderWriterProvider()
Returns fully-qualified name of the DataReaderWriterProvider service provide interface implementation which
will be used to create DataReader and DataWriter instances.
|
boolean |
getLogDurableWrite()
Returns
true if file system's fsync call after should be executed after each committed or flushed
transaction. |
long |
getLogFileSize()
Returns the maximum size in kilobytes of a single
Log file (.xd file). |
java.lang.String |
getLogLockId()
Sets the debug identifier to be written to the lock file alongside with other debug information.
|
long |
getLogLockTimeout()
Returns the number of milliseconds the
Log constructor waits for the lock file. |
long |
getLogSyncPeriod()
Returns the period in milliseconds to force file system's fsync call that often if LOG_DURABLE_WRITE
is switched off.
|
boolean |
getManagementOperationsRestricted()
If is set to
true then exposed JMX managed beans cannot have operations. |
java.lang.Long |
getMemoryUsage()
Returns absolute value of memory in bytes that can be used by the LogCache if it is set.
|
int |
getMemoryUsagePercentage()
Returns percent of max memory (specified by the "-Xmx" java parameter) that can be used by the LogCache.
|
MetaServer |
getMetaServer() |
boolean |
getProfilerEnabled()
If is set to
true database profiler is enabled. |
int |
getTreeDupMaxPageSize()
Returns the maximum size of page of duplicates sub-B+Tree.
|
int |
getTreeMaxPageSize()
Returns the maximum size of page of B+Tree.
|
int |
getTreeNodesCacheSize()
Deprecated.
|
boolean |
getUseVersion1Format() |
boolean |
isEnvTxnTraceFinish()
If is set to
true then each transaction, read/write or read-only, saves stack trace
when it is finished (aborted or committed). |
boolean |
isGcEnabled()
Returns
true if the database garbage collector is enabled. |
boolean |
isLogAllowRamDisk()
For DataReaderWriterProvider.DEFAULT_READER_WRITER_PROVIDER used as DataReaderWriterProvider service provider interface implementation, if is set to
true
then the database can be opened on RAM-disk. |
boolean |
isLogAllowRemote()
For DataReaderWriterProvider.DEFAULT_READER_WRITER_PROVIDER used as DataReaderWriterProvider service provider interface implementation, if is set to
true
then the database can be opened on a remote storage. |
boolean |
isLogAllowRemovable()
For DataReaderWriterProvider.DEFAULT_READER_WRITER_PROVIDER used as DataReaderWriterProvider service provider interface implementation, if is set to
true
then the database can be opened on a removable storage. |
boolean |
isLogCacheNonBlocking()
Returns
true if the LogCache should use lock-free data structures. |
boolean |
isLogCacheShared()
Returns
true if the LogCache is shared. |
boolean |
isLogCleanDirectoryExpected()
Returns
true if the Log constructor fails if the database directory is not clean. |
boolean |
isLogClearInvalid()
Returns
true if the Log constructor implicitly clears the database if it occurred to be invalid
when opened. |
boolean |
isLogFullFileReadonly()
Returns
true if each complete and immutable Log file (.xd file) should marked with read-only
attribute. |
boolean |
isManagementEnabled()
Return
true if the Environment exposes two JMX managed beans. |
EnvironmentConfig |
setCipherBasicIV(long basicIV)
Sets basic IV (initialization vector) which will be used to encrypt the database.
|
EnvironmentConfig |
setCipherId(java.lang.String id)
Sets id of StreamCipherProvider which will be used to encrypt the database.
|
EnvironmentConfig |
setCipherKey(java.lang.String cipherKey)
Sets the key which will be used to encrypt the database.
|
EnvironmentConfig |
setEnvCloseForcedly(boolean closeForcedly)
Set
true if Environment.close() shouldn't check if there are unfinished
transactions. |
EnvironmentConfig |
setEnvCompactOnOpen(boolean compactOnOpen)
|
EnvironmentConfig |
setEnvFailFastInReadonly(boolean failFast)
If is set to
true and ENV_IS_READONLY is also true then the Environment
obligatorily creates transactions for which Transaction.isReadonly() is true. |
EnvironmentConfig |
setEnvGatherStatistics(boolean gatherStatistics)
Set
true if the Environment should gather statistics. |
EnvironmentConfig |
setEnvIsReadonly(boolean isReadonly)
Set
true to turn the Environment instance to read-only mode. |
EnvironmentConfig |
setEnvMaxParallelReadonlyTxns(int maxParallelReadonlyTxns)
Sets the number of read-only transactions that can be started in parallel.
|
EnvironmentConfig |
setEnvMaxParallelTxns(int maxParallelTxns)
Sets the number of transactions that can be started in parallel.
|
EnvironmentConfig |
setEnvMonitorTxnsCheckFreq(int freq)
If ENV_MONITOR_TXNS_TIMEOUT is non-zero then stuck transactions monitor starts and checks
Environment's transactions with this frequency (period) specified in milliseconds.
|
EnvironmentConfig |
setEnvMonitorTxnsExpirationTimeout(int timeout)
Defines Transaction expiration timeout in milliseconds.
|
EnvironmentConfig |
setEnvMonitorTxnsTimeout(int timeout)
Sets Transaction timeout in milliseconds.
|
EnvironmentConfig |
setEnvReadonlyEmptyStores(boolean readonlyEmptyStores)
If is set to
true and ENV_IS_READONLY is also true then
Environment.openStore(String, StoreConfig, Transaction) doesn't try to create a Store,
but returns an empty immutable instance instead. |
EnvironmentConfig |
setEnvStoreGetCacheMaxValueSize(int valueSize) |
EnvironmentConfig |
setEnvStoreGetCacheMinTreeSize(int treeSize) |
EnvironmentConfig |
setEnvStoreGetCacheSize(int storeGetCacheSize)
Sets the size of the "store-get" cache.
|
EnvironmentConfig |
setEnvTxnDowngradeAfterFlush(boolean downgrade)
|
EnvironmentConfig |
setEnvTxnReplayMaxCount(int count)
Sets the number of times which a Transaction can try to flush without attempts to upgrade
(switch to an exclusive mode).
|
EnvironmentConfig |
setEnvTxnReplayTimeout(long timeout)
Sets the number of millisecond which a Transaction can try to flush without attempts to upgrade
(switch to an exclusive mode).
|
EnvironmentConfig |
setEnvTxnSingleThreadWrites(boolean singleThreadWrites)
If is set to
true then any write operation can be performed only in the thread which
the transaction was created in. |
EnvironmentConfig |
setEnvTxnTraceFinish(boolean traceFinish)
If is set to
true then each transaction, read/write or read-only, saves stack trace
when it is finished (aborted or committed). |
EnvironmentConfig |
setFullFileReadonly(boolean readonly)
Set
true if each complete and immutable Log file (.xd file) should marked with read-only
attribute. |
EnvironmentConfig |
setGcEnabled(boolean enabled)
Set
true to enable the database garbage collector. |
EnvironmentConfig |
setGcFileMinAge(int minAge)
Returns the minimum age of a
Log file (.xd file) to consider it for cleaning by the database garbage
collector. |
EnvironmentConfig |
setGcFilesDeletionDelay(int delay)
Sets the number of milliseconds which deletion of any successfully cleaned
Log file (.xd file)
is postponed for. |
EnvironmentConfig |
setGcFilesInterval(int files)
Deprecated.
|
EnvironmentConfig |
setGcMinUtilization(int percent)
Sets percent of minimum database utilization.
|
EnvironmentConfig |
setGcRenameFiles(boolean rename)
Set
true if the database garbage collector should rename files rather than deletes them. |
EnvironmentConfig |
setGcRunEvery(int seconds)
Sets GC to be forced every this number of seconds.
|
EnvironmentConfig |
setGcRunPeriod(int runPeriod)
Sets the number of milliseconds after which background cleaning cycle (single run of the database garbage
collector) can be repeated if the previous one didn't reach required utilization.
|
EnvironmentConfig |
setGcStartIn(int startInMillis)
Sets the number of milliseconds which the database garbage collector is postponed for after the
Environment is created.
|
EnvironmentConfig |
setGcTransactionAcquireTimeout(int txnAcquireTimeout)
Sets timeout in milliseconds which is used by the database garbage collector to acquire exclusive
Transaction for its purposes if GC_USE_EXCLUSIVE_TRANSACTION is
true. |
EnvironmentConfig |
setGcTransactionTimeout(int txnTimeout)
Sets timeout in milliseconds which is used by the database garbage collector to reclaim non-expired data
in several files inside single GC Transaction acquired exclusively.
|
EnvironmentConfig |
setGcUseExclusiveTransaction(boolean useExclusiveTransaction)
Sets
true if the database garbage collector should try to acquire exclusive Transaction
for its purposes. |
EnvironmentConfig |
setGcUseExpirationChecker(boolean useExpirationChecker)
Deprecated.
|
EnvironmentConfig |
setGcUtilizationFromFile(java.lang.String file)
Sets full path to the file with stored utilization.
|
EnvironmentConfig |
setGcUtilizationFromScratch(boolean fromScratch)
Set
true if database utilization should be computed from scratch before the first cleaning
cycle (single run of the database garbage collector) is triggered, i.e. |
EnvironmentConfig |
setLogAllowRamDisk(boolean allow)
For DataReaderWriterProvider.DEFAULT_READER_WRITER_PROVIDER used as DataReaderWriterProvider service provider interface implementation, if is set to
true
then the database can be opened on RAM-disk. |
EnvironmentConfig |
setLogAllowRemote(boolean allow)
For DataReaderWriterProvider.DEFAULT_READER_WRITER_PROVIDER used as DataReaderWriterProvider service provider interface implementation, if is set to
true
then the database can be opened on a remote storage. |
EnvironmentConfig |
setLogAllowRemovable(boolean allow)
For DataReaderWriterProvider.DEFAULT_READER_WRITER_PROVIDER used as DataReaderWriterProvider service provider interface implementation, if is set to
true
then the database can be opened on a removable storage. |
EnvironmentConfig |
setLogCacheFreePhysicalMemoryThreshold(long freePhysicalMemoryThreshold)
If LOG_CACHE_USE_NIO is
true sets the minimum size in bytes of free physical memory
maintained by the cache memory-mapped files on the host where the JVM runs. |
EnvironmentConfig |
setLogCacheGenerationCount(int generationCount)
Sets the number of generations of non-blocking LogCache.
|
EnvironmentConfig |
setLogCacheNonBlocking(boolean nonBlocking)
Set
true if the LogCache should use lock-free data structures. |
EnvironmentConfig |
setLogCacheOpenFilesCount(int files)
Sets the maximum number of open files that the LogCache maintains in order to reduce system calls to open and
close files.
|
EnvironmentConfig |
setLogCachePageSize(int bytes)
Sets the size in bytes of a single page (byte array) in the LogCache.
|
EnvironmentConfig |
setLogCacheReadAheadMultiple(int readAheadMultiple)
Sets the number of successive pages to be read at once in case of LogCache miss.
|
EnvironmentConfig |
setLogCacheShared(boolean shared)
Set
true if the LogCache should be shared. |
EnvironmentConfig |
setLogCacheUseNio(boolean useNio)
Set
true to allow any immutable .xd file to be mapped in memory provided there is enough physical memory. |
EnvironmentConfig |
setLogCacheUseSoftReferences(boolean useSoftReferences)
Set
true if LogCache should use soft references for
holding cached pages. |
EnvironmentConfig |
setLogCacheWarmup(boolean warmup)
Set
true if LogCache should populate itself with database file pages right after the database is
opened using this EnvironmentConfig instance. |
EnvironmentConfig |
setLogCleanDirectoryExpected(boolean logCleanDirectoryExpected)
Set
true if the Log constructor should fail if the database directory is not clean. |
EnvironmentConfig |
setLogClearInvalid(boolean logClearInvalid)
Set
true if the Log constructor should implicitly clear the database if it occurred to be invalid
when opened. |
EnvironmentConfig |
setLogDataReaderWriterProvider(@NotNull java.lang.String provider)
Sets fully-qualified name of the DataReaderWriterProvider service provide interface implementation which
will be used to create DataReader and DataWriter instances.
|
EnvironmentConfig |
setLogDurableWrite(boolean durableWrite)
Sets flag whether transactions should force fsync after each commit or flush.
|
EnvironmentConfig |
setLogFileSize(long kilobytes)
Sets the maximum size in kilobytes of a single
Log file (.xd file). |
EnvironmentConfig |
setLogLockId(java.lang.String id)
Sets the debug identifier to be written to the lock file alongside with other debug information.
|
EnvironmentConfig |
setLogLockTimeout(long millis)
Sets the number of milliseconds the
Log constructor waits for the lock file. |
EnvironmentConfig |
setLogSyncPeriod(long millis)
Sets the period in milliseconds to force file system's fsync call that often if LOG_DURABLE_WRITE
is switched off.
|
EnvironmentConfig |
setManagementEnabled(boolean managementEnabled)
Set
true if the Environment should expose two JMX managed beans. |
EnvironmentConfig |
setManagementOperationsRestricted(boolean operationsRestricted)
If isManagementEnabled() then set
false in order to expose operations with JMX managed
beans in addition to attributes. |
EnvironmentConfig |
setMemoryUsage(long maxMemory)
Sets absolute value of memory in bytes that can be used by the LogCache.
|
EnvironmentConfig |
setMemoryUsagePercentage(int memoryUsagePercentage)
Sets percent of max memory (specified by the "-Xmx" java parameter) that can be used by the LogCache.
|
EnvironmentConfig |
setMetaServer(MetaServer metaServer) |
EnvironmentConfig |
setMutable(boolean isMutable)
Set
true for making it possible to change settings of this EnvironmentConfig instance. |
EnvironmentConfig |
setProfilerEnabled(boolean enabled)
Set
true to enable database profiler. |
EnvironmentConfig |
setSetting(@NotNull java.lang.String key,
@NotNull java.lang.Object value)
Sets the value of the setting with the specified key.
|
EnvironmentConfig |
setTreeDupMaxPageSize(int pageSize)
Sets the maximum size of page of duplicates sub-B+Tree.
|
EnvironmentConfig |
setTreeMaxPageSize(int pageSize)
Sets the maximum size of page of B+Tree.
|
EnvironmentConfig |
setTreeNodesCacheSize(int cacheSize)
Deprecated.
|
EnvironmentConfig |
setUseVersion1Format(boolean useVersion1Format) |
addChangedSettingsListener, getSetting, getSettings, isMutable, removeChangedSettingsListener, removeSetting, resumeConfigChangeListenersForThread, setSettings, suppressConfigChangeListenersForThreadpublic static final EnvironmentConfig DEFAULT
public static final java.lang.String MEMORY_USAGE
Mutable at runtime: no
MEMORY_USAGE_PERCENTAGE,
Constant Field Valuespublic static final java.lang.String MEMORY_USAGE_PERCENTAGE
50.
Mutable at runtime: no
MEMORY_USAGE,
Constant Field Valuespublic static final java.lang.String USE_VERSION1_FORMAT
public static final java.lang.String CIPHER_ID
null, which means that the database won't be encrypted. The setting cannot be changed for existing databases.
Default value is null.
Mutable at runtime: no
public static final java.lang.String CIPHER_KEY
null. The setting cannot be changed for existing databases.
Default value is null.
Mutable at runtime: no
public static final java.lang.String CIPHER_BASIC_IV
null.
The setting cannot be changed for existing databases.
Default value is 0L.
Mutable at runtime: no
public static final java.lang.String PROFILER_ENABLED
true database profiler is enabled. By default, it is disabled.
Mutable at runtime: no
public static final java.lang.String LOG_DURABLE_WRITE
true forces file system's fsync call after each committed or flushed transaction. By default,
is switched off since it creates great performance overhead and can be controlled manually.
Mutable at runtime: yes
public static final java.lang.String LOG_FILE_SIZE
Log file (.xd file). The setting cannot be changed
for existing databases. Default value is 8192L.
Mutable at runtime: no
public static final java.lang.String LOG_LOCK_TIMEOUT
0L.
Mutable at runtime: no
public static final java.lang.String LOG_LOCK_ID
ManagementFactory.getRuntimeMXBean().getName() which has a form of pid@hostname.
Mutable at runtime: no
public static final java.lang.String LOG_CACHE_PAGE_SIZE
If the LogCache is shared (LOG_CACHE_SHARED) all Environments should be configured to use single LogCache page size.
Default value is 64 * 1024.
Mutable at runtime: no
public static final java.lang.String LOG_CACHE_OPEN_FILES
500.
Open files cache is shared amongst all open environments.
Mutable at runtime: no
public static final java.lang.String LOG_CACHE_USE_NIO
true any immutable file can be mapped in memory provided there is enough physical memory.
On cache miss, LogCache at first tries to check if there is corresponding mapped byte buffer and copies
cache page from the buffer, otherwise reads the page from RandomAccessFile. If is set to
false then LogCache always reads RandomAccessFile on cache miss.
Default value was true before version 1.2.3. As of 1.2.3, default value is false.
Mutable at runtime: no
public static final java.lang.String LOG_CACHE_FREE_PHYSICAL_MEMORY_THRESHOLD
true defines the minimum size in bytes of free physical memory
maintained by the cache memory-mapped files on the host where the JVM runs. On cache miss, LogCache checks if
corresponding file is mapped in memory, and if it is not and if free physical memory amount is greater than
threshold specified by this setting, tries to map the file in memory. Default value is 1_000_000_000L
bytes, i.e. ~1GB.
Mutable at runtime: no
LOG_CACHE_USE_NIO,
Constant Field Valuespublic static final java.lang.String LOG_CACHE_SHARED
true the LogCache is shared. Shared cache caches raw binary
data (contents of .xd files) of all Environment instances created in scope of this class loader.
By default, the LogCache is shared.
Mutable at runtime: no
public static final java.lang.String LOG_CACHE_NON_BLOCKING
true the LogCache uses lock-free data structures. Default value is true.
Mutable at runtime: no
public static final java.lang.String LOG_CACHE_GENERATION_COUNT
true. The higher number of generations is, the higher the cache hit rate is and CPU ticks
necessary to get a single page from the cache. Default value is 2.
Mutable at runtime: no
public static final java.lang.String LOG_CACHE_USE_SOFT_REFERENCES
true LogCache uses soft references for
holding cached pages. The cache still uses not more memory than it is configured by MEMORY_USAGE or
MEMORY_USAGE_PERCENTAGE settings, but JVM GC can reclaim memory used by the cache on
a heavy load surge. On the other hand, use of soft references results in greater JVM GC load and greater
general CPU consumption by the cache. So one can choose either memory-flexible, or CPU-optimal cache.
Default value is false.
Mutable at runtime: no
public static final java.lang.String LOG_CACHE_READ_AHEAD_MULTIPLE
1 which means that no read-ahead strategy is applied.
Mutable at runtime: yes
public static final java.lang.String LOG_CACHE_WARMUP
true LogCache will populate itself with database file pages right after the database is
opened using this EnvironmentConfig instance. Default value is false.
Mutable at runtime: no
public static final java.lang.String LOG_CLEAN_DIRECTORY_EXPECTED
true then the Log constructor fails if the database directory is not clean. Can be useful
if an applications expects that the database should always be newly created. Default value is false.
Mutable at runtime: no
public static final java.lang.String LOG_CLEAR_INVALID
true then the Log constructor implicitly clears the database if it occurred to be invalid
when opened. Default value is false.
Mutable at runtime: no
public static final java.lang.String LOG_SYNC_PERIOD
10000L.
Mutable at runtime: yes
LOG_DURABLE_WRITE,
Constant Field Valuespublic static final java.lang.String LOG_FULL_FILE_READ_ONLY
true then each complete and immutable Log file (.xd file) is marked with read-only
attribute. Default value is true.
Mutable at runtime: no
public static final java.lang.String LOG_ALLOW_REMOVABLE
true
then the database can be opened on a removable storage. Attempt to open database on a storage of not allowed
type results in StorageTypeNotAllowedException. Default value is false.
Mutable at runtime: no
public static final java.lang.String LOG_ALLOW_REMOTE
true
then the database can be opened on a remote storage. Attempt to open database on a storage of not allowed
type results in StorageTypeNotAllowedException. Default value is false.
Mutable at runtime: no
public static final java.lang.String LOG_ALLOW_RAM_DISK
true
then the database can be opened on RAM-disk. Attempt to open database on a storage of not allowed
type results in StorageTypeNotAllowedException. Default value is false.
Mutable at runtime: no
public static final java.lang.String LOG_DATA_READER_WRITER_PROVIDER
Mutable at runtime: no
public static final java.lang.String ENV_IS_READONLY
true then the Environment instance is read-only. Default value is false.
Mutable at runtime: yes
public static final java.lang.String ENV_FAIL_FAST_IN_READONLY
true and ENV_IS_READONLY is also true then the Environment
obligatorily creates transactions for which Transaction.isReadonly() is true. Read-only
transactions fail-fast with ReadonlyTransactionException on attempt to modify data. If is set to
false and ENV_IS_READONLY is set to true then the Environment creates
transaction that allow to accumulate changes but cannot be flushed ot committed since the Environment
is read-only. Default value is true.
Mutable at runtime: yes
ENV_IS_READONLY,
Constant Field Valuespublic static final java.lang.String ENV_READONLY_EMPTY_STORES
true and ENV_IS_READONLY is also true then
Environment.openStore(String, StoreConfig, Transaction) doesn't try to create a Store,
but returns an empty immutable instance instead. Default value is false.
Mutable at runtime: yes
ENV_IS_READONLY,
Constant Field Valuespublic static final java.lang.String ENV_STOREGET_CACHE_SIZE
0 what means that
the cache is inactive. If the setting is mutated at runtime the cache is invalidated.
Mutable at runtime: yes
public static final java.lang.String ENV_STOREGET_CACHE_MIN_TREE_SIZE
public static final java.lang.String ENV_STOREGET_CACHE_MAX_VALUE_SIZE
public static final java.lang.String ENV_CLOSE_FORCEDLY
true then Environment.close() doest't check if there are unfinished
transactions. Otherwise it checks and throws ExodusException if there are.
Default value is false.
Mutable at runtime: yes
Environment.close(),
Constant Field Valuespublic static final java.lang.String ENV_TXN_REPLAY_TIMEOUT
2000L.
Mutable at runtime: yes
public static final java.lang.String ENV_TXN_REPLAY_MAX_COUNT
2.
Mutable at runtime: yes
public static final java.lang.String ENV_TXN_DOWNGRADE_AFTER_FLUSH
true then any upgraded Transaction will downgrade itself after
Transaction.flush(). Default value is true.
Mutable at runtime: yes
public static final java.lang.String ENV_TXN_SINGLE_THREAD_WRITES
true then any write operation can be performed only in the thread which
the transaction was created in. Default value is false.
Mutable at runtime: yes
Transaction,
Constant Field Valuespublic static final java.lang.String ENV_TXN_TRACE_FINISH
true then each transaction, read/write or read-only, saves stack trace
when it is finished (aborted or committed). The stack trace is then reported with
TransactionFinishedException. Default value is false.
Mutable at runtime: yes
Transaction,
Constant Field Valuespublic static final java.lang.String ENV_MAX_PARALLEL_TXNS
Mutable at runtime: no
Transaction,
Constant Field Values@Deprecated public static final java.lang.String ENV_MAX_PARALLEL_READONLY_TXNS
Mutable at runtime: no As of 1.4.0, is deprecated.
public static final java.lang.String ENV_MONITOR_TXNS_TIMEOUT
0
which means that no timeout for a Transaction is defined. In that case, no monitor of stuck
transactions is started. Otherwise it is started for each Environment, though consuming only a
single Thread amongst all environments created within a single class loader.
Mutable at runtime: no
public static final java.lang.String ENV_MONITOR_TXNS_EXPIRATION_TIMEOUT
8 hours. 0 value means that no expiration for a
Transaction is defined. In that case, no monitor of stuck
transactions is started. Otherwise it is started for each Environment, though consuming only a
single Thread amongst all environments created within a single class loader.
Mutable at runtime: no
public static final java.lang.String ENV_MONITOR_TXNS_CHECK_FREQ
60000, one minute.
Mutable at runtime: no
Transaction,
ENV_MONITOR_TXNS_TIMEOUT,
Constant Field Valuespublic static final java.lang.String ENV_GATHER_STATISTICS
true then the Environment gathers statistics. If
MANAGEMENT_ENABLED is also true then the statistics is exposed by the JMX managed bean.
Default value is true.
Mutable at runtime: no
public static final java.lang.String ENV_COMPACT_ON_OPEN
true then the Environment will compact itself on opening.
Default value is false.
Mutable at runtime: no
public static final java.lang.String TREE_MAX_PAGE_SIZE
128.
Mutable at runtime: yes
public static final java.lang.String TREE_DUP_MAX_PAGE_SIZE
8.
Mutable at runtime: yes
@Deprecated public static final java.lang.String TREE_NODES_CACHE_SIZE
Mutable at runtime: no
public static final java.lang.String GC_ENABLED
true then the database garbage collector is enabled. Default value is true.
Switching GC off makes sense only for debugging and troubleshooting purposes.
Mutable at runtime: yes
public static final java.lang.String GC_START_IN
10000.
Mutable at runtime: no
public static final java.lang.String GC_MIN_UTILIZATION
50. That means that 50 percent
of free space in raw data in Log files (.xd files) is allowed. If database utilization is less than
defined (free space percent is more than 50), the database garbage collector is triggered.
Mutable at runtime: yes
public static final java.lang.String GC_RENAME_FILES
true the database garbage collector renames files rather than deletes them. Default
value is false. It makes sense to change this setting only for debugging and troubleshooting purposes.
Mutable at runtime: yes
@Deprecated public static final java.lang.String GC_USE_EXPIRATION_CHECKER
Mutable at runtime: no
public static final java.lang.String GC_MIN_FILE_AGE
Log file (.xd file) to consider it for cleaning by the database garbage
collector. The age of the last (the newest, the rightmost) Log file is 0, the age of previous
file is 1, etc. Default value is 2.
Mutable at runtime: yes
@Deprecated public static final java.lang.String GC_FILES_INTERVAL
Log files (.xd files) that must be created to trigger if necessary (if database
utilization is not sufficient) the next background cleaning cycle (single run of the database garbage collector)
after the previous cycle finished. Default value is 3, i.e. GC can start after each 3 newly created
Log files.
Mutable at runtime: yes
public static final java.lang.String GC_RUN_PERIOD
5000.
Mutable at runtime: yes
public static final java.lang.String GC_UTILIZATION_FROM_SCRATCH
true then database utilization will be computed from scratch before the first cleaning
cycle (single run of the database garbage collector) is triggered, i.e. shortly after the database is open.
In addition, can be used to compute utilization information at runtime by just modifying the setting value.
Default value is false.
Mutable at runtime: yes
public static final java.lang.String GC_UTILIZATION_FROM_FILE
.xd files' utilization before the first cleaning
cycle (single run of the database garbage collector) is triggered. In addition, can be used to reload utilization
information at runtime by just modifying the setting value. Format of the stored utilization is expected
to be the same as created by the "-d" option of the Reflect tool.
Default value is empty string.
Mutable at runtime: yes
public static final java.lang.String GC_USE_EXCLUSIVE_TRANSACTION
true the database garbage collector tries to acquire exclusive Transaction
for its purposes. In that case, GC transaction never re-plays. In order to not block background cleaner thread
forever, acquisition of exclusive GC transaction is performed with a timeout controlled by the
GC_TRANSACTION_ACQUIRE_TIMEOUT setting. Default value is true.
Mutable at runtime: yes
public static final java.lang.String GC_TRANSACTION_ACQUIRE_TIMEOUT
true.
Default value is 1000.
Mutable at runtime: yes
public static final java.lang.String GC_TRANSACTION_TIMEOUT
true.
Default value is 500.
Mutable at runtime: yes
public static final java.lang.String GC_FILES_DELETION_DELAY
Log file (.xd file)
is postponed for. Default value is 5000.
Mutable at runtime: yes
public static final java.lang.String GC_RUN_EVERY
0 which means
that GC is not forced periodically.
Mutable at runtime: yes
public static final java.lang.String MANAGEMENT_ENABLED
true then the Environment exposes two JMX managed beans. One for
environment statistics and second for controlling the
EnvironmentConfig settings. Default value is true for non-Android OS, under Android it is
always false.
Mutable at runtime: no
public static final java.lang.String MANAGEMENT_OPERATIONS_RESTRICTED
true then exposed JMX managed beans cannot have operations.
Default value is true.
Mutable at runtime: no
MANAGEMENT_ENABLED,
Constant Field Valuespublic static final java.lang.String META_SERVER
null, expose created environment via given server.
Mutable at runtime: no
public EnvironmentConfig()
public EnvironmentConfig(@NotNull
@NotNull ConfigurationStrategy strategy)
public EnvironmentConfig setSetting(@NotNull @NotNull java.lang.String key, @NotNull @NotNull java.lang.Object value)
setSetting in class AbstractConfigkey - name of the settingvalue - the setting valueEnvironmentConfig instancepublic EnvironmentConfig setMutable(boolean isMutable)
true for making it possible to change settings of this EnvironmentConfig instance.
EnvironmentConfig.DEFAULT is always immutable.setMutable in class AbstractConfigisMutable - true if this EnvironmentConfig instance can be mutatedEnvironmentConfig instancepublic java.lang.Long getMemoryUsage()
Mutable at runtime: no
nullgetMemoryUsagePercentage()public EnvironmentConfig setMemoryUsage(long maxMemory)
Mutable at runtime: no
maxMemory - number of bytes that can be used by the LogCacheEnvironmentConfig instancesetMemoryUsagePercentage(int)public int getMemoryUsagePercentage()
50.
Mutable at runtime: no
getMemoryUsage()public EnvironmentConfig setMemoryUsagePercentage(int memoryUsagePercentage)
50.
Mutable at runtime: no
memoryUsagePercentage - percent of max memory that can be used by the LogCacheEnvironmentConfig instancesetMemoryUsage(long)public boolean getUseVersion1Format()
public EnvironmentConfig setUseVersion1Format(boolean useVersion1Format)
@Nullable public @Nullable java.lang.String getCipherId()
null, which means that the database won't be encrypted. The setting cannot be changed for existing databases.
Default value is null.
Mutable at runtime: no
getCipherKey(),
getCipherBasicIV(),
StreamCipher,
StreamCipherProviderpublic EnvironmentConfig setCipherId(java.lang.String id)
null, which means that the database won't be encrypted. The setting cannot be changed for existing databases.
Default value is null.
Mutable at runtime: no
id - id of StreamCipherProviderEnvironmentConfig instancesetCipherKey(String),
setCipherBasicIV(long),
StreamCipher,
StreamCipherProvider@Nullable public @Nullable byte[] getCipherKey()
null for no encryption. Is applicable
only if* getCipherId() returns not null. Default value is null.
Mutable at runtime: no
null for no encryptiongetCipherId(),
getCipherBasicIV(),
StreamCipher,
StreamCipher.init(byte[], long),
StreamCipherProviderpublic EnvironmentConfig setCipherKey(java.lang.String cipherKey)
null. The setting cannot be changed for existing databases.
Default value is null.
Mutable at runtime: no
cipherKey - hex string representing cipher keyEnvironmentConfig instancesetCipherId(String),
setCipherBasicIV(long),
StreamCipher,
StreamCipher.init(byte[], long),
StreamCipherProviderpublic long getCipherBasicIV()
null.
The setting cannot be changed for existing databases.
Default value is 0L.
Mutable at runtime: no
getCipherId(),
getCipherKey(),
StreamCipher,
StreamCipher.init(byte[], long),
StreamCipherProviderpublic EnvironmentConfig setCipherBasicIV(long basicIV)
null.
The setting cannot be changed for existing databases.
Default value is 0L.
Mutable at runtime: no
basicIV - basic IV (initialization vector) which will be used to encrypt the databaseEnvironmentConfig instancesetCipherId(String),
setCipherKey(String),
StreamCipher,
StreamCipher.init(byte[], long),
StreamCipherProviderpublic boolean getProfilerEnabled()
true database profiler is enabled. By default, it is disabled.
Mutable at runtime: no
true if database profiler is enabled.public EnvironmentConfig setProfilerEnabled(boolean enabled)
true to enable database profiler. By default, it is disabled.
Mutable at runtime: no
enabled - true to enable database profiler.EnvironmentConfig instancepublic boolean getLogDurableWrite()
true if file system's fsync call after should be executed after each committed or flushed
transaction. By default, is switched off since it creates significant performance overhead and can be
controlled manually.
Mutable at runtime: yes
true if transactions are durablegetLogSyncPeriod()public EnvironmentConfig setLogDurableWrite(boolean durableWrite)
Mutable at runtime: yes
durableWrite - true if transactions should be durableEnvironmentConfig instancesetLogSyncPeriod(long)public long getLogFileSize()
Log file (.xd file). The setting cannot be changed
for existing databases. Default value is 8192L.
Mutable at runtime: no
public EnvironmentConfig setLogFileSize(long kilobytes)
Log file (.xd file). The setting cannot be changed
for existing databases. Default value is 8192L.
Mutable at runtime: no
kilobytes - maximum size in kilobytes of a single .xd fileEnvironmentConfig instancepublic long getLogLockTimeout()
Log constructor waits for the lock file.
Default value is 0L, i.e. it doesn't wait and fails immediately if the lock is acquired.
Mutable at runtime: no
Log constructor waits for the lock filepublic EnvironmentConfig setLogLockId(java.lang.String id)
Mutable at runtime: no
id - the debug identifier to be written to the lock file alongside with other debug informationEnvironmentConfig instancepublic EnvironmentConfig setLogLockTimeout(long millis)
Log constructor waits for the lock file.
Mutable at runtime: no
millis - number of milliseconds the Log constructor should wait for the lock fileEnvironmentConfig instancepublic java.lang.String getLogLockId()
ManagementFactory.getRuntimeMXBean().getName() which has a form of pid@hostname.
Mutable at runtime: no
public int getLogCachePageSize()
If the LogCache is shared (LOG_CACHE_SHARED) all Environments should be configured to use single LogCache page size.
Default value is 64 * 1024.
Mutable at runtime: no
public EnvironmentConfig setLogCachePageSize(int bytes)
If the LogCache is shared (LOG_CACHE_SHARED) all Environments should be configured to use single LogCache page size.
Default value is 64 * 1024.
Mutable at runtime: no
bytes - size in bytes of a single page (byte array) in the LogCacheEnvironmentConfig instancepublic int getLogCacheOpenFilesCount()
500.
Open files cache is shared amongst all open environments.
Mutable at runtime: no
public EnvironmentConfig setLogCacheOpenFilesCount(int files)
500.
Open files cache is shared amongst all open environments.
Mutable at runtime: no
files - maximum number of open filesEnvironmentConfig instancepublic boolean getLogCacheUseNio()
true if any immutable .xd file can be mapped in memory provided there is enough physical memory.
On cache miss, LogCache at first tries to check if there is corresponding mapped byte buffer and copies
cache page from the buffer, otherwise reads the page from RandomAccessFile. If is set to
false then LogCache always reads RandomAccessFile on cache miss.
Default value was true before version 1.2.3. As of 1.2.3, default value is false.
Mutable at runtime: no
true mapping of .xd files in memory is allowedgetLogCacheFreePhysicalMemoryThreshold()public EnvironmentConfig setLogCacheUseNio(boolean useNio)
true to allow any immutable .xd file to be mapped in memory provided there is enough physical memory.
On cache miss, LogCache at first tries to check if there is corresponding mapped byte buffer and copies
cache page from the buffer, otherwise reads the page from RandomAccessFile. If is set to
false then LogCache always reads RandomAccessFile on cache miss.
Default value was true before version 1.2.3. As of 1.2.3, default value is false.
Mutable at runtime: no
useNio - true is using NIO is allowedEnvironmentConfig instancepublic long getLogCacheFreePhysicalMemoryThreshold()
true defines the minimum size in bytes of free physical memory
maintained by the cache memory-mapped files on the host where the JVM runs. On cache miss, LogCache checks if
corresponding file is mapped in memory, and if it is not and if free physical memory amount is greater than
threshold specified by this setting, tries to map the file in memory. Default value is 1_000_000_000L
bytes, i.e. ~1GB.public EnvironmentConfig setLogCacheFreePhysicalMemoryThreshold(long freePhysicalMemoryThreshold)
true sets the minimum size in bytes of free physical memory
maintained by the cache memory-mapped files on the host where the JVM runs. On cache miss, LogCache checks if
corresponding file is mapped in memory, and if it is not and if free physical memory amount is greater than
threshold specified by this setting, tries to map the file in memory. Default value is 1_000_000_000L
bytes, i.e. ~1GB.freePhysicalMemoryThreshold - minimum size in bytes of free physical memoryEnvironmentConfig instancepublic boolean isLogCacheShared()
true if the LogCache is shared. Shared cache caches raw binary
data (contents of .xd files) of all Environment instances created in scope of this class loader.
By default, the LogCache is shared.
Mutable at runtime: no
true if the LogCache is sharedpublic EnvironmentConfig setLogCacheShared(boolean shared)
true if the LogCache should be shared. Shared cache caches raw binary
data (contents of .xd files) of all Environment instances created in scope of this class loader.
By default, the LogCache is shared.
Mutable at runtime: no
shared - true if the LogCache should be sharedEnvironmentConfig instancepublic boolean isLogCacheNonBlocking()
true if the LogCache should use lock-free data structures. Default value is true.
There is no practical sense to use "blocking" cache, so the setting will be deprecated in future.
Mutable at runtime: no
true if the LogCache should use lock-free data structurespublic EnvironmentConfig setLogCacheNonBlocking(boolean nonBlocking)
true if the LogCache should use lock-free data structures. Default value is true.
There is no practical sense to use "blocking" cache, so the setting will be deprecated in future.
Mutable at runtime: no
nonBlocking - true if the LogCache should use lock-free data structuresEnvironmentConfig instancepublic int getLogCacheGenerationCount()
true. The higher number of generations is, the higher the cache hit rate is and CPU ticks
necessary to get a single page from the cache. Default value is 2.public EnvironmentConfig setLogCacheGenerationCount(int generationCount)
true. The higher number of generations is, the higher the cache hit rate is and CPU ticks
necessary to get a single page from the cache. Default value is 2.generationCount - number of generations of non-blocking LogCacheEnvironmentConfig instancepublic boolean getLogCacheUseSoftReferences()
true LogCache uses soft references for
holding cached pages. The cache still uses not more memory than it is configured by MEMORY_USAGE or
MEMORY_USAGE_PERCENTAGE settings, but JVM GC can reclaim memory used by the cache on
a heavy load surge. On the other hand, use of soft references results in greater JVM GC load and greater
general CPU consumption by the cache. So one can choose either memory-flexible, or CPU-optimal cache.
Default value is false.
Mutable at runtime: no
true if LogCache should use soft references for
holding cached pagespublic EnvironmentConfig setLogCacheUseSoftReferences(boolean useSoftReferences)
true if LogCache should use soft references for
holding cached pages. The cache still uses not more memory than it is configured by MEMORY_USAGE or
MEMORY_USAGE_PERCENTAGE settings, but JVM GC can reclaim memory used by the cache on
a heavy load surge. On the other hand, use of soft references results in greater JVM GC load and greater
general CPU consumption by the cache. So one can choose either memory-flexible, or CPU-optimal cache.
Default value is false.
Mutable at runtime: no
useSoftReferences - true if LogCache should use
soft references for holding cached pagesEnvironmentConfig instancepublic int getLogCacheReadAheadMultiple()
1 which means that no read-ahead strategy is applied.public EnvironmentConfig setLogCacheReadAheadMultiple(int readAheadMultiple)
1 which means that no read-ahead strategy is applied.readAheadMultiple - number of successive pages to be read at once in case of LogCache missEnvironmentConfig instancepublic boolean getLogCacheWarmup()
true if LogCache will populate itself with database file pages right after the database is
opened using this EnvironmentConfig instance. Default value is false.
Mutable at runtime: no
true if LogCache will populate itself with database file pagespublic EnvironmentConfig setLogCacheWarmup(boolean warmup)
true if LogCache should populate itself with database file pages right after the database is
opened using this EnvironmentConfig instance. Default value is false.
Mutable at runtime: no
warmup - true if LogCache should populate itself with database file pagesEnvironmentConfig instancepublic boolean isLogCleanDirectoryExpected()
true if the Log constructor fails if the database directory is not clean. Can be useful
if an applications expects that the database should always be newly created. Default value is false.
Mutable at runtime: no
true if the Log constructor fails if the database directory is not cleanpublic EnvironmentConfig setLogCleanDirectoryExpected(boolean logCleanDirectoryExpected)
true if the Log constructor should fail if the database directory is not clean. Can be useful
if an applications expects that the database should always be newly created. Default value is false.
Mutable at runtime: no
logCleanDirectoryExpected - true if the Log constructor should fail if the database directory is not cleanEnvironmentConfig instancepublic boolean isLogClearInvalid()
true if the Log constructor implicitly clears the database if it occurred to be invalid
when opened. Default value is false.
Mutable at runtime: no
true if the Log constructor should implicitly clear invalid databasepublic EnvironmentConfig setLogClearInvalid(boolean logClearInvalid)
true if the Log constructor should implicitly clear the database if it occurred to be invalid
when opened. Default value is false.
Mutable at runtime: no
logClearInvalid - true if the Log constructor should implicitly clear invalid databaseEnvironmentConfig instancepublic long getLogSyncPeriod()
10000L.
Mutable at runtime: yes
getLogDurableWrite()public EnvironmentConfig setLogSyncPeriod(long millis)
10000L.
Mutable at runtime: yes
millis - milliseconds to force file system's fsync call that oftenEnvironmentConfig instancesetLogDurableWrite(boolean)public boolean isLogFullFileReadonly()
true if each complete and immutable Log file (.xd file) should marked with read-only
attribute. Default value is true.
Mutable at runtime: no
true if each complete and immutable .xd file should marked with read-only attributepublic EnvironmentConfig setFullFileReadonly(boolean readonly)
true if each complete and immutable Log file (.xd file) should marked with read-only
attribute. Default value is true.
Mutable at runtime: no
readonly - true to mark each complete and immutable .xd file with read-only attributeEnvironmentConfig instancepublic boolean isLogAllowRemovable()
true
then the database can be opened on a removable storage. Attempt to open database on a storage of not allowed
type results in StorageTypeNotAllowedException. Default value is false.
Mutable at runtime: no
true if the database can be opened on a removable storagepublic EnvironmentConfig setLogAllowRemovable(boolean allow)
true
then the database can be opened on a removable storage. Attempt to open database on a storage of not allowed
type results in StorageTypeNotAllowedException. Default value is false.
Mutable at runtime: no
allow - true to allow using database located on removable storageEnvironmentConfig instancepublic boolean isLogAllowRemote()
true
then the database can be opened on a remote storage. Attempt to open database on a storage of not allowed
type results in StorageTypeNotAllowedException. Default value is false.
Mutable at runtime: no
true if the database can be opened on a remote storagepublic EnvironmentConfig setLogAllowRemote(boolean allow)
true
then the database can be opened on a remote storage. Attempt to open database on a storage of not allowed
type results in StorageTypeNotAllowedException. Default value is false.
Mutable at runtime: no
allow - true to allow using database located on remote storageEnvironmentConfig instancepublic boolean isLogAllowRamDisk()
true
then the database can be opened on RAM-disk. Attempt to open database on a storage of not allowed
type results in StorageTypeNotAllowedException. Default value is false.
Mutable at runtime: no
true if the database can be opened on RAM-diskpublic EnvironmentConfig setLogAllowRamDisk(boolean allow)
true
then the database can be opened on RAM-disk. Attempt to open database on a storage of not allowed
type results in StorageTypeNotAllowedException. Default value is false.
Mutable at runtime: no
allow - true to allow using database located on RAM-diskEnvironmentConfig instancepublic java.lang.String getLogDataReaderWriterProvider()
Mutable at runtime: no
public EnvironmentConfig setLogDataReaderWriterProvider(@NotNull @NotNull java.lang.String provider)
Mutable at runtime: no
provider - fully-qualified name of the DataReaderWriterProvider service provide interface implementationEnvironmentConfig instancepublic boolean getEnvIsReadonly()
true if the Environment instance is read-only. Default value is false.
Mutable at runtime: yes
true if the Environment instance is read-onlypublic EnvironmentConfig setEnvIsReadonly(boolean isReadonly)
true to turn the Environment instance to read-only mode. Default value is false.
Mutable at runtime: yes
isReadonly - true to turn the Environment instance to read-only modeEnvironmentConfig instancepublic boolean getEnvFailFastInReadonly()
true and ENV_IS_READONLY is also true then the Environment
obligatorily creates transactions for which Transaction.isReadonly() is true. Read-only
transactions fail-fast with ReadonlyTransactionException on attempt to modify data. If is set to
false and ENV_IS_READONLY is set to true then the Environment creates
transaction that allow to accumulate changes but cannot be flushed ot committed since the Environment
is read-only. Default value is true.
Mutable at runtime: yes
true if attempt to modify data won't fail immediately in read-only modepublic EnvironmentConfig setEnvFailFastInReadonly(boolean failFast)
true and ENV_IS_READONLY is also true then the Environment
obligatorily creates transactions for which Transaction.isReadonly() is true. Read-only
transactions fail-fast with ReadonlyTransactionException on attempt to modify data. If is set to
false and ENV_IS_READONLY is set to true then the Environment creates
transaction that allow to accumulate changes but cannot be flushed ot committed since the Environment
is read-only. Default value is true.
Mutable at runtime: yes
failFast - true if attempt modify data shouldn fail immediately in read-only modeEnvironmentConfig instancepublic boolean getEnvReadonlyEmptyStores()
true and ENV_IS_READONLY is also true then
Environment.openStore(String, StoreConfig, Transaction) doesn't try to create a Store,
but returns an empty immutable instance instead. Default value is false.
Mutable at runtime: yes
true if attempt to create a Store won't fail immediately in read-only modepublic EnvironmentConfig setEnvReadonlyEmptyStores(boolean readonlyEmptyStores)
true and ENV_IS_READONLY is also true then
Environment.openStore(String, StoreConfig, Transaction) doesn't try to create a Store,
but returns an empty immutable instance instead. Default value is false.
Mutable at runtime: yes
readonlyEmptyStores - true if attempt to create a Store shouldn't fail immediately in read-only modeEnvironmentConfig instancepublic int getEnvStoreGetCacheSize()
0 what means that
the cache is inactive. If the setting is mutated at runtime the cache is invalidated.
Mutable at runtime: yes
public EnvironmentConfig setEnvStoreGetCacheSize(int storeGetCacheSize)
0 what means that
the cache is inactive. If the setting is mutated at runtime the cache is invalidated.
Mutable at runtime: yes
storeGetCacheSize - size of the "store-get" cacheEnvironmentConfig instancepublic int getEnvStoreGetCacheMinTreeSize()
public EnvironmentConfig setEnvStoreGetCacheMinTreeSize(int treeSize)
public int getEnvStoreGetCacheMaxValueSize()
public EnvironmentConfig setEnvStoreGetCacheMaxValueSize(int valueSize)
public boolean getEnvCloseForcedly()
true if Environment.close() shouldn't check if there are unfinished
transactions. Otherwise it should check and throw ExodusException if there are.
Default value is false.
Mutable at runtime: yes
true if Environment.close() shouldn't check unfinished transactionsEnvironment.close()public EnvironmentConfig setEnvCloseForcedly(boolean closeForcedly)
true if Environment.close() shouldn't check if there are unfinished
transactions. Set false if it should check and throw ExodusException if there are unfinished
transactions. Default value is false.
Mutable at runtime: yes
closeForcedly - true if Environment.close() should ignore unfinished transactionsEnvironmentConfig instanceEnvironment.close()public long getEnvTxnReplayTimeout()
2000L.
Mutable at runtime: yes
Transaction,
getEnvTxnReplayMaxCount()public EnvironmentConfig setEnvTxnReplayTimeout(long timeout)
2000L.
Mutable at runtime: yes
timeout - number of millisecond which a Transaction can try to flush without attempts to upgradeEnvironmentConfig instanceTransaction,
setEnvTxnReplayMaxCount(int)public int getEnvTxnReplayMaxCount()
2.
Mutable at runtime: yes
Transaction,
getEnvTxnReplayTimeout()public EnvironmentConfig setEnvTxnReplayMaxCount(int count)
2.
Mutable at runtime: yes
count - number of times which a Transaction can try to flush without attempts to upgradeEnvironmentConfig instanceTransaction,
setEnvTxnReplayTimeout(long)public boolean getEnvTxnDowngradeAfterFlush()
true then any upgraded Transaction will downgrade itself after
Transaction.flush(). Default value is true.
Mutable at runtime: yes
true if any upgraded Transaction will downgrade itself after flushpublic EnvironmentConfig setEnvTxnDowngradeAfterFlush(boolean downgrade)
true then any upgraded Transaction will downgrade itself after
Transaction.flush(). Default value is true.
Mutable at runtime: yes
downgrade - true if any upgraded Transaction will downgrade itself after flushEnvironmentConfig instancepublic boolean getEnvTxnSingleThreadWrites()
true then any write operation can be performed only in the thread which
the transaction was created in. Default value is false.
Mutable at runtime: yes
true if any write operation can be performed only in the thread which
the transaction was created inTransactionpublic EnvironmentConfig setEnvTxnSingleThreadWrites(boolean singleThreadWrites)
true then any write operation can be performed only in the thread which
the transaction was created in. Default value is false.
Mutable at runtime: yes
singleThreadWrites - true then any write operation can be performed only in the thread which
the transaction was created inEnvironmentConfig instancepublic boolean isEnvTxnTraceFinish()
true then each transaction, read/write or read-only, saves stack trace
when it is finished (aborted or committed). The stack trace is then reported with
TransactionFinishedException. Default value is false.
Mutable at runtime: yes
true if each transaction saves stack trace when it is finishedTransactionpublic EnvironmentConfig setEnvTxnTraceFinish(boolean traceFinish)
true then each transaction, read/write or read-only, saves stack trace
when it is finished (aborted or committed). The stack trace is then reported with
TransactionFinishedException. Default value is false.
Mutable at runtime: yes
traceFinish - true if each transaction should save stack trace when it is finishedEnvironmentConfig instanceTransactionpublic int getEnvMaxParallelTxns()
Mutable at runtime: no
public EnvironmentConfig setEnvMaxParallelTxns(int maxParallelTxns)
Mutable at runtime: no
maxParallelTxns - number of transactions that can be started in parallelEnvironmentConfig instance@Deprecated public int getEnvMaxParallelReadonlyTxns()
Mutable at runtime: no As of 1.4.0, is deprecated.
public EnvironmentConfig setEnvMaxParallelReadonlyTxns(int maxParallelReadonlyTxns)
Mutable at runtime: no As of 1.4.0, is deprecated.
maxParallelReadonlyTxns - number of read-only transactions that can be started in parallelEnvironmentConfig instancepublic int getEnvMonitorTxnsTimeout()
0
which means that no timeout for a Transaction is defined. In that case, no monitor of stuck
transactions is started. Otherwise it is started for each Environment, though consuming only a
single Thread amongst all environments created within a single class loader.
Mutable at runtime: no
getEnvMonitorTxnsCheckFreq()public EnvironmentConfig setEnvMonitorTxnsTimeout(int timeout)
0
which means that no timeout for a Transaction is defined. In that case, no monitor of stuck
transactions is started. Otherwise it is started for each Environment, though consuming only a
single Thread amongst all environments created within a single class loader.
Mutable at runtime: no
timeout - timeout of a Transaction in millisecondsEnvironmentConfig instancesetEnvMonitorTxnsCheckFreq(int)public int getEnvMonitorTxnsExpirationTimeout()
8 hours. 0 value means that no expiration for a
Transaction is defined. Otherwise it is started for each Environment, though consuming only a
single Thread amongst all environments created within a single class loader.
Mutable at runtime: no
getEnvMonitorTxnsCheckFreq()public EnvironmentConfig setEnvMonitorTxnsExpirationTimeout(int timeout)
8 hours. 0 value means that no expiration for a
Transaction is defined. Otherwise it is started for each Environment, though consuming only a
single Thread amongst all environments created within a single class loader.
Mutable at runtime: no
timeout - timeout of a Transaction in millisecondsEnvironmentConfig instancesetEnvMonitorTxnsCheckFreq(int)public int getEnvMonitorTxnsCheckFreq()
60000, one minute.
Mutable at runtime: no
getEnvMonitorTxnsTimeout()public EnvironmentConfig setEnvMonitorTxnsCheckFreq(int freq)
60000, one minute.
Mutable at runtime: no
freq - frequency (period) in milliseconds of checking stuck transactionsEnvironmentConfig instancesetEnvMonitorTxnsTimeout(int),
setEnvMonitorTxnsExpirationTimeout(int)public boolean getEnvGatherStatistics()
true if the Environment gathers statistics. If
MANAGEMENT_ENABLED is also true then the statistics is exposed by the JMX managed bean.
Default value is true.
Mutable at runtime: no
true if the Environment gathers statisticsEnvironment.getStatistics()public EnvironmentConfig setEnvGatherStatistics(boolean gatherStatistics)
true if the Environment should gather statistics. If
MANAGEMENT_ENABLED is also true then the statistics is exposed by the JMX managed bean.
Default value is true.
Mutable at runtime: no
gatherStatistics - true if the Environment should gather statisticsEnvironmentConfig instanceEnvironment.getStatistics()public boolean getEnvCompactOnOpen()
true if the Environment will compact itself on opening.
Default value is false.
Mutable at runtime: no
true if the Environment will compact itself on openingpublic EnvironmentConfig setEnvCompactOnOpen(boolean compactOnOpen)
true if the Environment should compact itself on opening
Default value is false.
Mutable at runtime: no
compactOnOpen - true if the Environment should compact itself on openingEnvironmentConfig instancepublic int getTreeMaxPageSize()
128.
Mutable at runtime: yes
public EnvironmentConfig setTreeMaxPageSize(int pageSize) throws InvalidSettingException
128. Only sizes in the range [16..1024]
are accepted.
Mutable at runtime: yes
pageSize - maximum size of page of B+TreeEnvironmentConfig instanceInvalidSettingException - page size is not in the range [16..1024]public int getTreeDupMaxPageSize()
8.
Mutable at runtime: yes
public EnvironmentConfig setTreeDupMaxPageSize(int pageSize) throws InvalidSettingException
8. Only sizes in the range [8..128]
are accepted.
Mutable at runtime: yes
pageSize - maximum size of page of duplicates sub-B+TreeEnvironmentConfig instanceInvalidSettingException - page size is not in the range [8..128]@Deprecated public int getTreeNodesCacheSize()
Mutable at runtime: no
0@Deprecated public EnvironmentConfig setTreeNodesCacheSize(int cacheSize)
Mutable at runtime: no
EnvironmentConfig instancepublic boolean isGcEnabled()
true if the database garbage collector is enabled. Default value is true.
Switching GC off makes sense only for debugging and troubleshooting purposes.
Mutable at runtime: yes
true if the database garbage collector is enabledpublic EnvironmentConfig setGcEnabled(boolean enabled)
true to enable the database garbage collector. Default value is true.
Switching GC off makes sense only for debugging and troubleshooting purposes.
Mutable at runtime: yes
enabled - true to enable the database garbage collectorEnvironmentConfig instancepublic int getGcStartIn()
10000.
Mutable at runtime: no
public EnvironmentConfig setGcStartIn(int startInMillis) throws InvalidSettingException
10000.
Mutable at runtime: no
startInMillis - number of milliseconds which the database garbage collector should be postponed for after the
Environment is createdEnvironmentConfig instanceInvalidSettingException - startInMillis is negativepublic int getGcMinUtilization()
50. That means that 50 percent
of free space in raw data in Log files (.xd files) is allowed. If database utilization is less than
defined (free space percent is more than 50), the database garbage collector is triggered.
Mutable at runtime: yes
public EnvironmentConfig setGcMinUtilization(int percent) throws InvalidSettingException
50. That means that 50 percent
of free space in raw data in Log files (.xd files) is allowed. If database utilization is less than
defined (free space percent is more than 50), the database garbage collector is triggered.
Mutable at runtime: yes
percent - percent of minimum database utilizationEnvironmentConfig instanceInvalidSettingException - percent is not in the range [1..90]public boolean getGcRenameFiles()
true the database garbage collector renames files rather than deletes them. Default
value is false. It makes sense to change this setting only for debugging and troubleshooting purposes.
Mutable at runtime: yes
true if the database garbage collector should rename files rather than deletes thempublic EnvironmentConfig setGcRenameFiles(boolean rename)
true if the database garbage collector should rename files rather than deletes them. Default
value is false. It makes sense to change this setting only for debugging and troubleshooting purposes.
Mutable at runtime: yes
rename - true if the database garbage collector should rename files rather than deletes themEnvironmentConfig instance@Deprecated public boolean getGcUseExpirationChecker()
Mutable at runtime: no
false@Deprecated public EnvironmentConfig setGcUseExpirationChecker(boolean useExpirationChecker)
Mutable at runtime: no
EnvironmentConfig instancepublic int getGcFileMinAge()
Log file (.xd file) to consider it for cleaning by the database garbage
collector. The age of the last (the newest, the rightmost) Log file is 0, the age of previous
file is 1, etc. Default value is 2.
Mutable at runtime: yes
public EnvironmentConfig setGcFileMinAge(int minAge) throws InvalidSettingException
Log file (.xd file) to consider it for cleaning by the database garbage
collector. The age of the last (the newest, the rightmost) Log file is 0, the age of previous
file is 1, etc. Default value is 2. The age cannot be less than 1.
Mutable at runtime: yes
minAge - minimum age of .xd file to consider it for cleaning by the database garbage collectorEnvironmentConfig instanceInvalidSettingException - minAge is less than 1.@Deprecated public int getGcFilesInterval()
Log files (.xd files) that must be created to trigger if necessary (if database
utilization is not sufficient) the next background cleaning cycle (single run of the database garbage collector)
after the previous cycle finished. Default value is 3, i.e. GC can start after each 3 newly created
Log files.
Mutable at runtime: yes
@Deprecated public EnvironmentConfig setGcFilesInterval(int files) throws InvalidSettingException
Log files (.xd files) that must be created to trigger if necessary (if database
utilization is not sufficient) the next background cleaning cycle (single run of the database garbage collector)
after the previous cycle finished. Default value is 3, i.e. GC can start after each 3 newly created
Log files. Cannot be less than 1.
Mutable at runtime: yes
files - number of new .xd files that must be created to trigger the next background cleaning cycleEnvironmentConfig instanceInvalidSettingException - files is less than 1public int getGcRunPeriod()
5000.
Mutable at runtime: yes
public EnvironmentConfig setGcRunPeriod(int runPeriod) throws InvalidSettingException
5000.
Mutable at runtime: yes
runPeriod - number of milliseconds after which background cleaning cycle can be repeated if the previous one
didn't reach required utilizationEnvironmentConfig instanceInvalidSettingException - runPeriod is less than 0public boolean getGcUtilizationFromScratch()
true if database utilization will be computed from scratch before the first cleaning
cycle (single run of the database garbage collector) is triggered, i.e. shortly after the database is open.
In addition, can be used to compute utilization information at runtime by just modifying the setting value.
Default value is false.
Mutable at runtime: yes
true if database utilization will be computed from scratchpublic EnvironmentConfig setGcUtilizationFromScratch(boolean fromScratch)
true if database utilization should be computed from scratch before the first cleaning
cycle (single run of the database garbage collector) is triggered, i.e. shortly after the database is open.
In addition, can be used to compute utilization information at runtime by just modifying the setting value.
Default value is false.
Mutable at runtime: yes
fromScratch - true if database utilization should be computed from scratchEnvironmentConfig instancepublic java.lang.String getGcUtilizationFromFile()
.xd files' utilization before the first cleaning
cycle (single run of the database garbage collector) is triggered. In addition, can be used to reload utilization
information at runtime by just modifying the setting value. Format of the stored utilization is expected
to be the same as created by the "-d" option of the Reflect tool.
Default value is empty string.
Mutable at runtime: yes
public EnvironmentConfig setGcUtilizationFromFile(java.lang.String file)
.xd files' utilization before the first cleaning
cycle (single run of the database garbage collector) is triggered. In addition, can be used to reload utilization
information at runtime by just modifying the setting value. Format of the stored utilization is expected
to be the same as created by the "-d" option of the Reflect tool.
Default value is empty string.
Mutable at runtime: yes
file - full path to the file with stored utilizationEnvironmentConfig instancepublic boolean getGcUseExclusiveTransaction()
true if the database garbage collector tries to acquire exclusive Transaction
for its purposes. In that case, GC transaction never re-plays. In order to not block background cleaner thread
forever, acquisition of exclusive GC transaction is performed with a timeout controlled by the
GC_TRANSACTION_ACQUIRE_TIMEOUT setting. Default value is true.
Mutable at runtime: yes
true if the database garbage collector tries to acquire exclusive TransactiongetGcTransactionAcquireTimeout(),
getGcTransactionTimeout()public EnvironmentConfig setGcUseExclusiveTransaction(boolean useExclusiveTransaction)
true if the database garbage collector should try to acquire exclusive Transaction
for its purposes. In that case, GC transaction never re-plays. In order to not block background cleaner thread
forever, acquisition of exclusive GC transaction is performed with a timeout controlled by the
GC_TRANSACTION_ACQUIRE_TIMEOUT setting. Default value is true.
Mutable at runtime: yes
useExclusiveTransaction - true if the database garbage collector should try to acquire exclusive TransactionEnvironmentConfig instancesetGcTransactionAcquireTimeout(int),
setGcTransactionTimeout(int)public int getGcTransactionAcquireTimeout()
true.
Default value is 1000.
Mutable at runtime: yes
getGcUseExclusiveTransaction(),
getGcTransactionTimeout()public EnvironmentConfig setGcTransactionAcquireTimeout(int txnAcquireTimeout)
true.
Default value is 1000.
Mutable at runtime: yes
txnAcquireTimeout - timeout in milliseconds which is used by the database garbage collector to acquire exclusive TransactionEnvironmentConfig instancesetGcUseExclusiveTransaction(boolean),
setGcTransactionTimeout(int)public int getGcTransactionTimeout()
true.
Default value is 500.
Mutable at runtime: yes
getGcUseExclusiveTransaction(),
getGcTransactionAcquireTimeout()public EnvironmentConfig setGcTransactionTimeout(int txnTimeout)
true.
Default value is 500.
Mutable at runtime: yes
txnTimeout - timeout in milliseconds which is used by the database garbage collector to reclaim non-expired data
in several files inside single Transaction acquired exclusivelyEnvironmentConfig instancesetGcUseExclusiveTransaction(boolean),
setGcTransactionAcquireTimeout(int)public int getGcFilesDeletionDelay()
Log file (.xd file)
is postponed for. Default value is 5000.
Mutable at runtime: yes
public EnvironmentConfig setGcFilesDeletionDelay(int delay) throws InvalidSettingException
Log file (.xd file)
is postponed for. Default value is 5000.
Mutable at runtime: yes
delay - number of milliseconds which deletion of any successfully cleaned .xd file is postponed forEnvironmentConfig instanceInvalidSettingException - delay is less than 0.public int getGcRunEvery()
0 which means that GC is not forced periodically.
Mutable at runtime: yes
public EnvironmentConfig setGcRunEvery(int seconds)
0.
Mutable at runtime: yes
public boolean isManagementEnabled()
true if the Environment exposes two JMX managed beans. One for
environment statistics and second for controlling the
EnvironmentConfig settings. Default value is true for non-Android OS, under Android it is
always false.
Mutable at runtime: no
true if the Environment exposes JMX managed beanspublic EnvironmentConfig setManagementEnabled(boolean managementEnabled)
true if the Environment should expose two JMX managed beans. One for
environment statistics and second for controlling the
EnvironmentConfig settings. Default value is true for non-Android OS, under Android it is
always false.
Mutable at runtime: no
managementEnabled - true if the Environment should expose JMX managed beansEnvironmentConfig instancepublic boolean getManagementOperationsRestricted()
true then exposed JMX managed beans cannot have operations.
Default value is true.
Mutable at runtime: no
true if exposed JMX managed beans cannot have operations.isManagementEnabled()public EnvironmentConfig setManagementOperationsRestricted(boolean operationsRestricted)
false in order to expose operations with JMX managed
beans in addition to attributes.operationsRestricted - false if JMX managed beans should expose operations in addition to attributesEnvironmentConfig instancepublic EnvironmentConfig setMetaServer(MetaServer metaServer)
public MetaServer getMetaServer()