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 -
Method Summary
Modifier and Type Method Description StringgetBackupDirectory()The backup directory.StringgetBaseDirectory()The base directory of the storage in the file system.intgetChannelCount()The number of threads and number of directories used by the storage engine.StringgetChannelDirectoryPrefix()Name prefix of the subdirectories used by the channel threads.booleangetDataFileCleanupHeadFile()A flag defining wether the current head file (the only file actively written to) shall be subjected to file cleanups as well.intgetDataFileMaximumSize()Maximum file size for a data file to avoid cleaning it up.intgetDataFileMinimumSize()Minimum file size for a data file to avoid cleaning it up.doublegetDataFileMinimumUseRatio()The ratio (value in ]0.0;1.0]) of non-gap data contained in a storage file to prevent the file from being dissolved.StringgetDataFilePrefix()Name prefix of the storage files.StringgetDataFileSuffix()Name suffix of the storage files.StringgetDeletionDirectory()The deletion directory.longgetEntityCacheThreshold()Abstract threshold value for the lifetime of entities in the cache.longgetEntityCacheTimeoutMs()Timeout in milliseconds for the entity cache evaluator.longgetHousekeepingIntervalMs()Interval in milliseconds for the houskeeping.longgetHousekeepingTimeBudgetNs()Number of nanoseconds used for each housekeeping cycle.StringgetLockFileName()StringgetRescuedFileSuffix()StringgetTransactionFilePrefix()Name prefix of the storage transaction file.StringgetTransactionFileSuffix()Name suffix of the storage transaction file.StringgetTruncationDirectory()The truncation directory.StringgetTypeDictionaryFilename()The name of the dictionary file.ConfigurationsetBackupDirectory(String backupDirectory)The backup directory.ConfigurationsetBaseDirectory(String baseDirectory)The base directory of the storage in the file system.ConfigurationsetChannelCount(int channelCount)The number of threads and number of directories used by the storage engine.ConfigurationsetChannelDirectoryPrefix(String channelDirectoryPrefix)Name prefix of the subdirectories used by the channel threads.ConfigurationsetDataFileCleanupHeadFile(boolean dataFileCleanupHeadFile)A flag defining wether the current head file (the only file actively written to) shall be subjected to file cleanups as well.ConfigurationsetDataFileMaximumSize(int dataFileMaximumSize)Maximum file size for a data file to avoid cleaning it up.ConfigurationsetDataFileMinimumSize(int dataFileMinimumSize)Minimum file size for a data file to avoid cleaning it up.ConfigurationsetDataFileMinimumUseRatio(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.ConfigurationsetDataFilePrefix(String dataFilePrefix)Name prefix of the storage files.ConfigurationsetDataFileSuffix(String dataFileSuffix)Name suffix of the storage files.ConfigurationsetDeletionDirectory(String deletionDirectory)The deletion directory.ConfigurationsetEntityCacheThreshold(long entityCacheThreshold)Abstract threshold value for the lifetime of entities in the cache.ConfigurationsetEntityCacheTimeoutMs(long entityCacheTimeoutMs)Timeout in milliseconds for the entity cache evaluator.ConfigurationsetHousekeepingIntervalMs(long housekeepingIntervalMs)Interval in milliseconds for the houskeeping.ConfigurationsetHousekeepingTimeBudgetNs(long housekeepingNanoTimeBudgetNs)Number of nanoseconds used for each housekeeping cycle.ConfigurationsetLockFileName(String lockFileName)ConfigurationsetRescuedFileSuffix(String rescuedFileSuffix)ConfigurationsetTransactionFilePrefix(String transactionFilePrefix)Name prefix of the storage transaction file.ConfigurationsetTransactionFileSuffix(String transactionFileSuffix)Name suffix of the storage transaction file.ConfigurationsetTruncationDirectory(String truncationDirectory)The truncation directory.ConfigurationsetTypeDictionaryFilename(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, waitMethods 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
-
Method Details
-
setBaseDirectory
Description copied from interface:ConfigurationThe base directory of the storage in the file system.- Specified by:
setBaseDirectoryin interfaceConfiguration
-
getBaseDirectory
Description copied from interface:ConfigurationThe base directory of the storage in the file system.- Specified by:
getBaseDirectoryin interfaceConfiguration
-
setDeletionDirectory
Description copied from interface:ConfigurationThe deletion directory.- Specified by:
setDeletionDirectoryin interfaceConfiguration
-
getDeletionDirectory
Description copied from interface:ConfigurationThe deletion directory.- Specified by:
getDeletionDirectoryin interfaceConfiguration
-
setTruncationDirectory
Description copied from interface:ConfigurationThe truncation directory.- Specified by:
setTruncationDirectoryin interfaceConfiguration
-
getTruncationDirectory
Description copied from interface:ConfigurationThe truncation directory.- Specified by:
getTruncationDirectoryin interfaceConfiguration
-
setBackupDirectory
Description copied from interface:ConfigurationThe backup directory.- Specified by:
setBackupDirectoryin interfaceConfiguration
-
getBackupDirectory
Description copied from interface:ConfigurationThe backup directory.- Specified by:
getBackupDirectoryin interfaceConfiguration
-
setChannelCount
Description copied from interface:ConfigurationThe number of threads and number of directories used by the storage engine. Every thread has exclusive access to its directory. Default is1.- Specified by:
setChannelCountin interfaceConfiguration- Parameters:
channelCount- the new channel count, must be a power of 2
-
getChannelCount
public int getChannelCount()Description copied from interface:ConfigurationThe number of threads and number of directories used by the storage engine. Every thread has exclusive access to its directory.- Specified by:
getChannelCountin interfaceConfiguration
-
setChannelDirectoryPrefix
Description copied from interface:ConfigurationName prefix of the subdirectories used by the channel threads. Default is"channel_".- Specified by:
setChannelDirectoryPrefixin interfaceConfiguration- Parameters:
channelDirectoryPrefix- new prefix
-
getChannelDirectoryPrefix
Description copied from interface:ConfigurationName prefix of the subdirectories used by the channel threads.- Specified by:
getChannelDirectoryPrefixin interfaceConfiguration
-
setDataFilePrefix
Description copied from interface:ConfigurationName prefix of the storage files. Default is"channel_".- Specified by:
setDataFilePrefixin interfaceConfiguration- Parameters:
dataFilePrefix- new prefix
-
getDataFilePrefix
Description copied from interface:ConfigurationName prefix of the storage files.- Specified by:
getDataFilePrefixin interfaceConfiguration
-
setDataFileSuffix
Description copied from interface:ConfigurationName suffix of the storage files. Default is".dat".- Specified by:
setDataFileSuffixin interfaceConfiguration- Parameters:
dataFileSuffix- new suffix
-
getDataFileSuffix
Description copied from interface:ConfigurationName suffix of the storage files.- Specified by:
getDataFileSuffixin interfaceConfiguration
-
setTransactionFilePrefix
Description copied from interface:ConfigurationName prefix of the storage transaction file. Default is"transactions_".- Specified by:
setTransactionFilePrefixin interfaceConfiguration- Parameters:
transactionFilePrefix- new prefix
-
getTransactionFilePrefix
Description copied from interface:ConfigurationName prefix of the storage transaction file.- Specified by:
getTransactionFilePrefixin interfaceConfiguration
-
setTransactionFileSuffix
Description copied from interface:ConfigurationName suffix of the storage transaction file. Default is".sft".- Specified by:
setTransactionFileSuffixin interfaceConfiguration- Parameters:
transactionFileSuffix- new suffix
-
getTransactionFileSuffix
Description copied from interface:ConfigurationName suffix of the storage transaction file.- Specified by:
getTransactionFileSuffixin interfaceConfiguration
-
setTypeDictionaryFilename
Description copied from interface:ConfigurationThe name of the dictionary file. Default is"PersistenceTypeDictionary.ptd".- Specified by:
setTypeDictionaryFilenamein interfaceConfiguration- Parameters:
typeDictionaryFilename- new name
-
getTypeDictionaryFilename
Description copied from interface:ConfigurationThe name of the dictionary file.- Specified by:
getTypeDictionaryFilenamein interfaceConfiguration
-
setRescuedFileSuffix
- Specified by:
setRescuedFileSuffixin interfaceConfiguration
-
getRescuedFileSuffix
- Specified by:
getRescuedFileSuffixin interfaceConfiguration
-
setLockFileName
- Specified by:
setLockFileNamein interfaceConfiguration
-
getLockFileName
- Specified by:
getLockFileNamein interfaceConfiguration
-
setHousekeepingIntervalMs
Description copied from interface:ConfigurationInterval 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:
setHousekeepingIntervalMsin interfaceConfiguration- Parameters:
housekeepingIntervalMs- the new interval- See Also:
Configuration.setHousekeepingTimeBudgetNs(long)
-
getHousekeepingIntervalMs
public long getHousekeepingIntervalMs()Description copied from interface:ConfigurationInterval in milliseconds for the houskeeping. This is work like garbage collection or cache checking.- Specified by:
getHousekeepingIntervalMsin interfaceConfiguration- See Also:
Configuration.getHousekeepingTimeBudgetNs()
-
setHousekeepingTimeBudgetNs
Description copied from interface:ConfigurationNumber 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:
setHousekeepingTimeBudgetNsin interfaceConfiguration- Parameters:
housekeepingNanoTimeBudgetNs- the new time budget- See Also:
Configuration.setHousekeepingIntervalMs(long)
-
getHousekeepingTimeBudgetNs
public long getHousekeepingTimeBudgetNs()Description copied from interface:ConfigurationNumber 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:
getHousekeepingTimeBudgetNsin interfaceConfiguration- See Also:
Configuration.getHousekeepingIntervalMs()
-
setEntityCacheThreshold
Description copied from interface:ConfigurationAbstract threshold value for the lifetime of entities in the cache. SeeStorageEntityCacheEvaluator. Default is1000000000.- Specified by:
setEntityCacheThresholdin interfaceConfiguration- Parameters:
entityCacheThreshold- the new threshold
-
getEntityCacheThreshold
public long getEntityCacheThreshold()Description copied from interface:ConfigurationAbstract threshold value for the lifetime of entities in the cache. SeeStorageEntityCacheEvaluator.- Specified by:
getEntityCacheThresholdin interfaceConfiguration
-
setEntityCacheTimeoutMs
Description copied from interface:ConfigurationTimeout 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:
setEntityCacheTimeoutMsin interfaceConfiguration- See Also:
Duration
-
getEntityCacheTimeoutMs
public long getEntityCacheTimeoutMs()Description copied from interface:ConfigurationTimeout 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:
getEntityCacheTimeoutMsin interfaceConfiguration
-
setDataFileMinimumSize
Description copied from interface:ConfigurationMinimum file size for a data file to avoid cleaning it up. Default is 1024^2 = 1 MiB.- Specified by:
setDataFileMinimumSizein interfaceConfiguration- Parameters:
dataFileMinimumSize- the new minimum file size- See Also:
Configuration.setDataFileMinimumUseRatio(double)
-
getDataFileMinimumSize
public int getDataFileMinimumSize()Description copied from interface:ConfigurationMinimum file size for a data file to avoid cleaning it up.- Specified by:
getDataFileMinimumSizein interfaceConfiguration- See Also:
Configuration.getDataFileMinimumUseRatio()
-
setDataFileMaximumSize
Description copied from interface:ConfigurationMaximum file size for a data file to avoid cleaning it up. Default is 1024^2*8 = 8 MiB.- Specified by:
setDataFileMaximumSizein interfaceConfiguration- Parameters:
dataFileMaximumSize- the new maximum file size- See Also:
Configuration.setDataFileMinimumUseRatio(double)
-
getDataFileMaximumSize
public int getDataFileMaximumSize()Description copied from interface:ConfigurationMaximum file size for a data file to avoid cleaning it up.- Specified by:
getDataFileMaximumSizein interfaceConfiguration- See Also:
Configuration.getDataFileMinimumUseRatio()
-
setDataFileMinimumUseRatio
Description copied from interface:ConfigurationThe 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:
setDataFileMinimumUseRatioin interfaceConfiguration- Parameters:
dataFileMinimumUseRatio- the new minimum use ratio
-
getDataFileMinimumUseRatio
public double getDataFileMinimumUseRatio()Description copied from interface:ConfigurationThe 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:
getDataFileMinimumUseRatioin interfaceConfiguration
-
setDataFileCleanupHeadFile
Description copied from interface:ConfigurationA flag defining wether the current head file (the only file actively written to) shall be subjected to file cleanups as well.- Specified by:
setDataFileCleanupHeadFilein interfaceConfiguration
-
getDataFileCleanupHeadFile
public boolean getDataFileCleanupHeadFile()Description copied from interface:ConfigurationA flag defining wether the current head file (the only file actively written to) shall be subjected to file cleanups as well.- Specified by:
getDataFileCleanupHeadFilein interfaceConfiguration
-