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 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.doublegetDataFileDissolveRatio()The degree of the data payload of a storage file to avoid cleaning it up.intgetDataFileMaxSize()Maximum file size for a data file to avoid cleaning it up.intgetDataFileMinSize()Minimum file size for a data file to avoid cleaning it up.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.longgetEntityCacheTimeout()Timeout in milliseconds for the entity cache evaluator.longgetHouseKeepingInterval()Interval in milliseconds for the houskeeping.longgetHouseKeepingNanoTimeBudget()Number of nanoseconds used for each housekeeping cycle.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.ConfigurationsetDataFileDissolveRatio(double dataFileDissolveRatio)The degree of the data payload of a storage file to avoid cleaning it up.ConfigurationsetDataFileMaxSize(int dataFileMaxSize)Maximum file size for a data file to avoid cleaning it up.ConfigurationsetDataFileMinSize(int dataFileMinSize)Minimum file size for a data file to avoid cleaning it up.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.ConfigurationsetEntityCacheTimeout(long entityCacheTimeout)Timeout in milliseconds for the entity cache evaluator.ConfigurationsetHouseKeepingInterval(long houseKeepingInterval)Interval in milliseconds for the houskeeping.ConfigurationsetHouseKeepingNanoTimeBudget(long houseKeepingNanoTimeBudget)Number of nanoseconds used for each housekeeping cycle.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, wait
-
Methods inherited from interface one.microstream.storage.configuration.Configuration
createEmbeddedStorageFoundation, setBackupDirectoryInUserHome, setBaseDirectoryInUserHome
-
-
-
-
Method Detail
-
setBaseDirectory
public Configuration setBaseDirectory(String baseDirectory)
Description copied from interface:ConfigurationThe base directory of the storage in the file system.- Specified by:
setBaseDirectoryin interfaceConfiguration
-
getBaseDirectory
public String getBaseDirectory()
Description copied from interface:ConfigurationThe base directory of the storage in the file system.- Specified by:
getBaseDirectoryin interfaceConfiguration
-
setDeletionDirectory
public Configuration setDeletionDirectory(String deletionDirectory)
Description copied from interface:ConfigurationThe deletion directory.- Specified by:
setDeletionDirectoryin interfaceConfiguration
-
getDeletionDirectory
public String getDeletionDirectory()
Description copied from interface:ConfigurationThe deletion directory.- Specified by:
getDeletionDirectoryin interfaceConfiguration
-
setTruncationDirectory
public Configuration setTruncationDirectory(String truncationDirectory)
Description copied from interface:ConfigurationThe truncation directory.- Specified by:
setTruncationDirectoryin interfaceConfiguration
-
getTruncationDirectory
public String getTruncationDirectory()
Description copied from interface:ConfigurationThe truncation directory.- Specified by:
getTruncationDirectoryin interfaceConfiguration
-
setBackupDirectory
public Configuration setBackupDirectory(String backupDirectory)
Description copied from interface:ConfigurationThe backup directory.- Specified by:
setBackupDirectoryin interfaceConfiguration
-
getBackupDirectory
public String getBackupDirectory()
Description copied from interface:ConfigurationThe backup directory.- Specified by:
getBackupDirectoryin interfaceConfiguration
-
setChannelCount
public Configuration setChannelCount(int channelCount)
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
public Configuration setChannelDirectoryPrefix(String channelDirectoryPrefix)
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
public String getChannelDirectoryPrefix()
Description copied from interface:ConfigurationName prefix of the subdirectories used by the channel threads.- Specified by:
getChannelDirectoryPrefixin interfaceConfiguration
-
setDataFilePrefix
public Configuration setDataFilePrefix(String dataFilePrefix)
Description copied from interface:ConfigurationName prefix of the storage files. Default is"channel_".- Specified by:
setDataFilePrefixin interfaceConfiguration- Parameters:
dataFilePrefix- new prefix
-
getDataFilePrefix
public String getDataFilePrefix()
Description copied from interface:ConfigurationName prefix of the storage files.- Specified by:
getDataFilePrefixin interfaceConfiguration
-
setDataFileSuffix
public Configuration setDataFileSuffix(String dataFileSuffix)
Description copied from interface:ConfigurationName suffix of the storage files. Default is".dat".- Specified by:
setDataFileSuffixin interfaceConfiguration- Parameters:
dataFileSuffix- new suffix
-
getDataFileSuffix
public String getDataFileSuffix()
Description copied from interface:ConfigurationName suffix of the storage files.- Specified by:
getDataFileSuffixin interfaceConfiguration
-
setTransactionFilePrefix
public Configuration setTransactionFilePrefix(String transactionFilePrefix)
Description copied from interface:ConfigurationName prefix of the storage transaction file. Default is"transactions_".- Specified by:
setTransactionFilePrefixin interfaceConfiguration- Parameters:
transactionFilePrefix- new prefix
-
getTransactionFilePrefix
public String getTransactionFilePrefix()
Description copied from interface:ConfigurationName prefix of the storage transaction file.- Specified by:
getTransactionFilePrefixin interfaceConfiguration
-
setTransactionFileSuffix
public Configuration setTransactionFileSuffix(String transactionFileSuffix)
Description copied from interface:ConfigurationName suffix of the storage transaction file. Default is".sft".- Specified by:
setTransactionFileSuffixin interfaceConfiguration- Parameters:
transactionFileSuffix- new suffix
-
getTransactionFileSuffix
public String getTransactionFileSuffix()
Description copied from interface:ConfigurationName suffix of the storage transaction file.- Specified by:
getTransactionFileSuffixin interfaceConfiguration
-
setTypeDictionaryFilename
public Configuration setTypeDictionaryFilename(String typeDictionaryFilename)
Description copied from interface:ConfigurationThe name of the dictionary file. Default is"PersistenceTypeDictionary.ptd".- Specified by:
setTypeDictionaryFilenamein interfaceConfiguration- Parameters:
typeDictionaryFilename- new name
-
getTypeDictionaryFilename
public String getTypeDictionaryFilename()
Description copied from interface:ConfigurationThe name of the dictionary file.- Specified by:
getTypeDictionaryFilenamein interfaceConfiguration
-
setHouseKeepingInterval
public Configuration setHouseKeepingInterval(long houseKeepingInterval)
Description copied from interface:ConfigurationInterval in milliseconds for the houskeeping. This is work like garbage collection or cache checking. In combination withConfiguration.setHouseKeepingNanoTimeBudget(long)the maximum processor time for housekeeping work can be set. Default is1000(every second).- Specified by:
setHouseKeepingIntervalin interfaceConfiguration- Parameters:
houseKeepingInterval- the new interval- See Also:
Configuration.setHouseKeepingNanoTimeBudget(long)
-
getHouseKeepingInterval
public long getHouseKeepingInterval()
Description copied from interface:ConfigurationInterval in milliseconds for the houskeeping. This is work like garbage collection or cache checking.- Specified by:
getHouseKeepingIntervalin interfaceConfiguration- See Also:
Configuration.getHouseKeepingNanoTimeBudget()
-
setHouseKeepingNanoTimeBudget
public Configuration setHouseKeepingNanoTimeBudget(long houseKeepingNanoTimeBudget)
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:
setHouseKeepingNanoTimeBudgetin interfaceConfiguration- Parameters:
houseKeepingNanoTimeBudget- the new time budget- See Also:
Configuration.setHouseKeepingInterval(long)
-
getHouseKeepingNanoTimeBudget
public long getHouseKeepingNanoTimeBudget()
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:
getHouseKeepingNanoTimeBudgetin interfaceConfiguration- See Also:
Configuration.getHouseKeepingInterval()
-
setEntityCacheThreshold
public Configuration setEntityCacheThreshold(long entityCacheThreshold)
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
-
setEntityCacheTimeout
public Configuration setEntityCacheTimeout(long entityCacheTimeout)
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:
setEntityCacheTimeoutin interfaceConfiguration- See Also:
Duration
-
getEntityCacheTimeout
public long getEntityCacheTimeout()
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:
getEntityCacheTimeoutin interfaceConfiguration
-
setDataFileMinSize
public Configuration setDataFileMinSize(int dataFileMinSize)
Description copied from interface:ConfigurationMinimum file size for a data file to avoid cleaning it up. Default is 1024^2 = 1 MiB.- Specified by:
setDataFileMinSizein interfaceConfiguration- Parameters:
dataFileMinSize- the new minimum file size- See Also:
Configuration.setDataFileDissolveRatio(double)
-
getDataFileMinSize
public int getDataFileMinSize()
Description copied from interface:ConfigurationMinimum file size for a data file to avoid cleaning it up.- Specified by:
getDataFileMinSizein interfaceConfiguration- See Also:
Configuration.getDataFileDissolveRatio()
-
setDataFileMaxSize
public Configuration setDataFileMaxSize(int dataFileMaxSize)
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:
setDataFileMaxSizein interfaceConfiguration- Parameters:
dataFileMaxSize- the new maximum file size- See Also:
Configuration.setDataFileDissolveRatio(double)
-
getDataFileMaxSize
public int getDataFileMaxSize()
Description copied from interface:ConfigurationMaximum file size for a data file to avoid cleaning it up.- Specified by:
getDataFileMaxSizein interfaceConfiguration- See Also:
Configuration.getDataFileDissolveRatio()
-
setDataFileDissolveRatio
public Configuration setDataFileDissolveRatio(double dataFileDissolveRatio)
Description copied from interface:ConfigurationThe degree of the data payload of a storage file to avoid cleaning it up. The storage engine only appends newly written records at the end of a channel. So no data will be overwritten but becomes obsolete (gaps). If all data file evaluator settings apply to a storage file it will be cleaned up. Meaning all valid records will be preserved by moving them to the end of the channel, then the file will be deleted.
Dissolve Ratio 1: If the first gap appears, the file will be cleaned up
Dissolve Ratio 0: Gaps don't matter, never clean up
Default is0.75(0.75%).- Specified by:
setDataFileDissolveRatioin interfaceConfiguration- Parameters:
dataFileDissolveRatio- the new dissolve ration
-
getDataFileDissolveRatio
public double getDataFileDissolveRatio()
Description copied from interface:ConfigurationThe degree of the data payload of a storage file to avoid cleaning it up. The storage engine only appends newly written records at the end of a channel. So no data will be overwritten but becomes obsolete (gaps). If all data file evaluator settings apply to a storage file it will be cleaned up. Meaning all valid records will be preserved by moving them to the end of the channel, then the file will be deleted.
Dissolve Ratio 1: If the first gap appears, the file will be cleaned up
Dissolve Ratio 0: Gaps don't matter, never clean up- Specified by:
getDataFileDissolveRatioin interfaceConfiguration
-
-