Class Configuration.Default
java.lang.Object
one.microstream.storage.configuration.Configuration.Default
- All Implemented Interfaces:
Configuration
- Enclosing interface:
- Configuration
public static class Configuration.Default extends Object implements Configuration
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.storage.configuration.Configuration
Configuration.Default
-
Constructor Summary
Constructors Constructor Description Default()
-
Method Summary
Modifier and Type Method Description String
getBackupDirectory()
The backup directory.String
getBaseDirectory()
The base directory of the storage in the file system.int
getChannelCount()
The number of threads and number of directories used by the storage engine.String
getChannelDirectoryPrefix()
Name prefix of the subdirectories used by the channel threads.boolean
getDataFileCleanupHeadFile()
A flag defining wether the current head file (the only file actively written to) shall be subjected to file cleanups as well.int
getDataFileMaximumSize()
Maximum file size for a data file to avoid cleaning it up.int
getDataFileMinimumSize()
Minimum file size for a data file to avoid cleaning it up.double
getDataFileMinimumUseRatio()
The ratio (value in ]0.0;1.0]) of non-gap data contained in a storage file to prevent the file from being dissolved.String
getDataFilePrefix()
Name prefix of the storage files.String
getDataFileSuffix()
Name suffix of the storage files.String
getDeletionDirectory()
The deletion directory.long
getEntityCacheThreshold()
Abstract threshold value for the lifetime of entities in the cache.long
getEntityCacheTimeoutMs()
Timeout in milliseconds for the entity cache evaluator.long
getHousekeepingIntervalMs()
Interval in milliseconds for the houskeeping.long
getHousekeepingTimeBudgetNs()
Number of nanoseconds used for each housekeeping cycle.String
getLockFileName()
String
getRescuedFileSuffix()
String
getTransactionFilePrefix()
Name prefix of the storage transaction file.String
getTransactionFileSuffix()
Name suffix of the storage transaction file.String
getTruncationDirectory()
The truncation directory.String
getTypeDictionaryFilename()
The name of the dictionary file.Configuration
setBackupDirectory(String backupDirectory)
The backup directory.Configuration
setBaseDirectory(String baseDirectory)
The base directory of the storage in the file system.Configuration
setChannelCount(int channelCount)
The number of threads and number of directories used by the storage engine.Configuration
setChannelDirectoryPrefix(String channelDirectoryPrefix)
Name prefix of the subdirectories used by the channel threads.Configuration
setDataFileCleanupHeadFile(boolean dataFileCleanupHeadFile)
A flag defining wether the current head file (the only file actively written to) shall be subjected to file cleanups as well.Configuration
setDataFileMaximumSize(int dataFileMaximumSize)
Maximum file size for a data file to avoid cleaning it up.Configuration
setDataFileMinimumSize(int dataFileMinimumSize)
Minimum file size for a data file to avoid cleaning it up.Configuration
setDataFileMinimumUseRatio(double dataFileMinimumUseRatio)
The ratio (value in ]0.0;1.0]) of non-gap data contained in a storage file to prevent the file from being dissolved.Configuration
setDataFilePrefix(String dataFilePrefix)
Name prefix of the storage files.Configuration
setDataFileSuffix(String dataFileSuffix)
Name suffix of the storage files.Configuration
setDeletionDirectory(String deletionDirectory)
The deletion directory.Configuration
setEntityCacheThreshold(long entityCacheThreshold)
Abstract threshold value for the lifetime of entities in the cache.Configuration
setEntityCacheTimeoutMs(long entityCacheTimeoutMs)
Timeout in milliseconds for the entity cache evaluator.Configuration
setHousekeepingIntervalMs(long housekeepingIntervalMs)
Interval in milliseconds for the houskeeping.Configuration
setHousekeepingTimeBudgetNs(long housekeepingNanoTimeBudgetNs)
Number of nanoseconds used for each housekeeping cycle.Configuration
setLockFileName(String lockFileName)
Configuration
setRescuedFileSuffix(String rescuedFileSuffix)
Configuration
setTransactionFilePrefix(String transactionFilePrefix)
Name prefix of the storage transaction file.Configuration
setTransactionFileSuffix(String transactionFileSuffix)
Name suffix of the storage transaction file.Configuration
setTruncationDirectory(String truncationDirectory)
The truncation directory.Configuration
setTypeDictionaryFilename(String typeDictionaryFilename)
The name of the dictionary file.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface one.microstream.storage.configuration.Configuration
createEmbeddedStorageFoundation, exportIni, exportIni, exportIni, exportIni, exportIni, exportIni, exportIni, exportIni, exportXml, exportXml, exportXml, exportXml, exportXml, exportXml, exportXml, exportXml, getDataFileDissolveRatio, getDataFileMaxSize, getDataFileMinSize, getEntityCacheTimeout, getHouseKeepingInterval, getHouseKeepingNanoTimeBudget, setBackupDirectoryInUserHome, setBaseDirectoryInUserHome, setDataFileDissolveRatio, setDataFileMaxSize, setDataFileMinSize, setEntityCacheTimeout, setHouseKeepingInterval, setHouseKeepingNanoTimeBudget
-
Constructor Details
-
Default
public Default()
-
-
Method Details
-
setBaseDirectory
Description copied from interface:Configuration
The base directory of the storage in the file system.- Specified by:
setBaseDirectory
in interfaceConfiguration
-
getBaseDirectory
Description copied from interface:Configuration
The base directory of the storage in the file system.- Specified by:
getBaseDirectory
in interfaceConfiguration
-
setDeletionDirectory
Description copied from interface:Configuration
The deletion directory.- Specified by:
setDeletionDirectory
in interfaceConfiguration
-
getDeletionDirectory
Description copied from interface:Configuration
The deletion directory.- Specified by:
getDeletionDirectory
in interfaceConfiguration
-
setTruncationDirectory
Description copied from interface:Configuration
The truncation directory.- Specified by:
setTruncationDirectory
in interfaceConfiguration
-
getTruncationDirectory
Description copied from interface:Configuration
The truncation directory.- Specified by:
getTruncationDirectory
in interfaceConfiguration
-
setBackupDirectory
Description copied from interface:Configuration
The backup directory.- Specified by:
setBackupDirectory
in interfaceConfiguration
-
getBackupDirectory
Description copied from interface:Configuration
The backup directory.- Specified by:
getBackupDirectory
in interfaceConfiguration
-
setChannelCount
Description copied from interface:Configuration
The number of threads and number of directories used by the storage engine. Every thread has exclusive access to its directory. Default is1
.- Specified by:
setChannelCount
in interfaceConfiguration
- Parameters:
channelCount
- the new channel count, must be a power of 2
-
getChannelCount
public int getChannelCount()Description copied from interface:Configuration
The number of threads and number of directories used by the storage engine. Every thread has exclusive access to its directory.- Specified by:
getChannelCount
in interfaceConfiguration
-
setChannelDirectoryPrefix
Description copied from interface:Configuration
Name prefix of the subdirectories used by the channel threads. Default is"channel_"
.- Specified by:
setChannelDirectoryPrefix
in interfaceConfiguration
- Parameters:
channelDirectoryPrefix
- new prefix
-
getChannelDirectoryPrefix
Description copied from interface:Configuration
Name prefix of the subdirectories used by the channel threads.- Specified by:
getChannelDirectoryPrefix
in interfaceConfiguration
-
setDataFilePrefix
Description copied from interface:Configuration
Name prefix of the storage files. Default is"channel_"
.- Specified by:
setDataFilePrefix
in interfaceConfiguration
- Parameters:
dataFilePrefix
- new prefix
-
getDataFilePrefix
Description copied from interface:Configuration
Name prefix of the storage files.- Specified by:
getDataFilePrefix
in interfaceConfiguration
-
setDataFileSuffix
Description copied from interface:Configuration
Name suffix of the storage files. Default is".dat"
.- Specified by:
setDataFileSuffix
in interfaceConfiguration
- Parameters:
dataFileSuffix
- new suffix
-
getDataFileSuffix
Description copied from interface:Configuration
Name suffix of the storage files.- Specified by:
getDataFileSuffix
in interfaceConfiguration
-
setTransactionFilePrefix
Description copied from interface:Configuration
Name prefix of the storage transaction file. Default is"transactions_"
.- Specified by:
setTransactionFilePrefix
in interfaceConfiguration
- Parameters:
transactionFilePrefix
- new prefix
-
getTransactionFilePrefix
Description copied from interface:Configuration
Name prefix of the storage transaction file.- Specified by:
getTransactionFilePrefix
in interfaceConfiguration
-
setTransactionFileSuffix
Description copied from interface:Configuration
Name suffix of the storage transaction file. Default is".sft"
.- Specified by:
setTransactionFileSuffix
in interfaceConfiguration
- Parameters:
transactionFileSuffix
- new suffix
-
getTransactionFileSuffix
Description copied from interface:Configuration
Name suffix of the storage transaction file.- Specified by:
getTransactionFileSuffix
in interfaceConfiguration
-
setTypeDictionaryFilename
Description copied from interface:Configuration
The name of the dictionary file. Default is"PersistenceTypeDictionary.ptd"
.- Specified by:
setTypeDictionaryFilename
in interfaceConfiguration
- Parameters:
typeDictionaryFilename
- new name
-
getTypeDictionaryFilename
Description copied from interface:Configuration
The name of the dictionary file.- Specified by:
getTypeDictionaryFilename
in interfaceConfiguration
-
setRescuedFileSuffix
- Specified by:
setRescuedFileSuffix
in interfaceConfiguration
-
getRescuedFileSuffix
- Specified by:
getRescuedFileSuffix
in interfaceConfiguration
-
setLockFileName
- Specified by:
setLockFileName
in interfaceConfiguration
-
getLockFileName
- Specified by:
getLockFileName
in interfaceConfiguration
-
setHousekeepingIntervalMs
Description copied from interface:Configuration
Interval in milliseconds for the houskeeping. This is work like garbage collection or cache checking. In combination withConfiguration.setHousekeepingTimeBudgetNs(long)
the maximum processor time for housekeeping work can be set. Default is1000
(every second).- Specified by:
setHousekeepingIntervalMs
in interfaceConfiguration
- Parameters:
housekeepingIntervalMs
- the new interval- See Also:
Configuration.setHousekeepingTimeBudgetNs(long)
-
getHousekeepingIntervalMs
public long getHousekeepingIntervalMs()Description copied from interface:Configuration
Interval in milliseconds for the houskeeping. This is work like garbage collection or cache checking.- Specified by:
getHousekeepingIntervalMs
in interfaceConfiguration
- See Also:
Configuration.getHousekeepingTimeBudgetNs()
-
setHousekeepingTimeBudgetNs
Description copied from interface:Configuration
Number of nanoseconds used for each housekeeping cycle. However, no matter how low the number is, one item of work will always be completed. But if there is nothing to clean up, no processor time will be wasted. Default is10000000
(10 million nanoseconds = 10 milliseconds = 0.01 seconds).- Specified by:
setHousekeepingTimeBudgetNs
in interfaceConfiguration
- Parameters:
housekeepingNanoTimeBudgetNs
- the new time budget- See Also:
Configuration.setHousekeepingIntervalMs(long)
-
getHousekeepingTimeBudgetNs
public long getHousekeepingTimeBudgetNs()Description copied from interface:Configuration
Number of nanoseconds used for each housekeeping cycle. However, no matter how low the number is, one item of work will always be completed. But if there is nothing to clean up, no processor time will be wasted.- Specified by:
getHousekeepingTimeBudgetNs
in interfaceConfiguration
- See Also:
Configuration.getHousekeepingIntervalMs()
-
setEntityCacheThreshold
Description copied from interface:Configuration
Abstract threshold value for the lifetime of entities in the cache. SeeStorageEntityCacheEvaluator
. Default is1000000000
.- Specified by:
setEntityCacheThreshold
in interfaceConfiguration
- Parameters:
entityCacheThreshold
- the new threshold
-
getEntityCacheThreshold
public long getEntityCacheThreshold()Description copied from interface:Configuration
Abstract threshold value for the lifetime of entities in the cache. SeeStorageEntityCacheEvaluator
.- Specified by:
getEntityCacheThreshold
in interfaceConfiguration
-
setEntityCacheTimeoutMs
Description copied from interface:Configuration
Timeout in milliseconds for the entity cache evaluator. If an entity wasn't accessed in this timespan it will be removed from the cache. Default is86400000
(1 day).- Specified by:
setEntityCacheTimeoutMs
in interfaceConfiguration
- See Also:
Duration
-
getEntityCacheTimeoutMs
public long getEntityCacheTimeoutMs()Description copied from interface:Configuration
Timeout in milliseconds for the entity cache evaluator. If an entity wasn't accessed in this timespan it will be removed from the cache.- Specified by:
getEntityCacheTimeoutMs
in interfaceConfiguration
-
setDataFileMinimumSize
Description copied from interface:Configuration
Minimum file size for a data file to avoid cleaning it up. Default is 1024^2 = 1 MiB.- Specified by:
setDataFileMinimumSize
in interfaceConfiguration
- Parameters:
dataFileMinimumSize
- the new minimum file size- See Also:
Configuration.setDataFileMinimumUseRatio(double)
-
getDataFileMinimumSize
public int getDataFileMinimumSize()Description copied from interface:Configuration
Minimum file size for a data file to avoid cleaning it up.- Specified by:
getDataFileMinimumSize
in interfaceConfiguration
- See Also:
Configuration.getDataFileMinimumUseRatio()
-
setDataFileMaximumSize
Description copied from interface:Configuration
Maximum file size for a data file to avoid cleaning it up. Default is 1024^2*8 = 8 MiB.- Specified by:
setDataFileMaximumSize
in interfaceConfiguration
- Parameters:
dataFileMaximumSize
- the new maximum file size- See Also:
Configuration.setDataFileMinimumUseRatio(double)
-
getDataFileMaximumSize
public int getDataFileMaximumSize()Description copied from interface:Configuration
Maximum file size for a data file to avoid cleaning it up.- Specified by:
getDataFileMaximumSize
in interfaceConfiguration
- See Also:
Configuration.getDataFileMinimumUseRatio()
-
setDataFileMinimumUseRatio
Description copied from interface:Configuration
The ratio (value in ]0.0;1.0]) of non-gap data contained in a storage file to prevent the file from being dissolved. "Gap" data is anything that is not the latest version of an entity's data, inluding older versions of an entity and "comment" bytes (a sequence of bytes beginning with its length as a negative value length header).
The closer this value is to 1.0 (100%), the less disk space is occupied by storage files, but the more file dissolving (data transfers to new files) is required and vice versa.- Specified by:
setDataFileMinimumUseRatio
in interfaceConfiguration
- Parameters:
dataFileMinimumUseRatio
- the new minimum use ratio
-
getDataFileMinimumUseRatio
public double getDataFileMinimumUseRatio()Description copied from interface:Configuration
The ratio (value in ]0.0;1.0]) of non-gap data contained in a storage file to prevent the file from being dissolved. "Gap" data is anything that is not the latest version of an entity's data, inluding older versions of an entity and "comment" bytes (a sequence of bytes beginning with its length as a negative value length header).
The closer this value is to 1.0 (100%), the less disk space is occupied by storage files, but the more file dissolving (data transfers to new files) is required and vice versa.- Specified by:
getDataFileMinimumUseRatio
in interfaceConfiguration
-
setDataFileCleanupHeadFile
Description copied from interface:Configuration
A flag defining wether the current head file (the only file actively written to) shall be subjected to file cleanups as well.- Specified by:
setDataFileCleanupHeadFile
in interfaceConfiguration
-
getDataFileCleanupHeadFile
public boolean getDataFileCleanupHeadFile()Description copied from interface:Configuration
A flag defining wether the current head file (the only file actively written to) shall be subjected to file cleanups as well.- Specified by:
getDataFileCleanupHeadFile
in interfaceConfiguration
-