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.double
getDataFileDissolveRatio()
The degree of the data payload of a storage file to avoid cleaning it up.int
getDataFileMaxSize()
Maximum file size for a data file to avoid cleaning it up.int
getDataFileMinSize()
Minimum file size for a data file to avoid cleaning it up.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
getEntityCacheTimeout()
Timeout in milliseconds for the entity cache evaluator.long
getHouseKeepingInterval()
Interval in milliseconds for the houskeeping.long
getHouseKeepingNanoTimeBudget()
Number of nanoseconds used for each housekeeping cycle.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
setDataFileDissolveRatio(double dataFileDissolveRatio)
The degree of the data payload of a storage file to avoid cleaning it up.Configuration
setDataFileMaxSize(int dataFileMaxSize)
Maximum file size for a data file to avoid cleaning it up.Configuration
setDataFileMinSize(int dataFileMinSize)
Minimum file size for a data file to avoid cleaning it up.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
setEntityCacheTimeout(long entityCacheTimeout)
Timeout in milliseconds for the entity cache evaluator.Configuration
setHouseKeepingInterval(long houseKeepingInterval)
Interval in milliseconds for the houskeeping.Configuration
setHouseKeepingNanoTimeBudget(long houseKeepingNanoTimeBudget)
Number of nanoseconds used for each housekeeping cycle.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, setBackupDirectoryInUserHome, setBaseDirectoryInUserHome
-
-
-
-
Method Detail
-
setBaseDirectory
public Configuration setBaseDirectory(String baseDirectory)
Description copied from interface:Configuration
The base directory of the storage in the file system.- Specified by:
setBaseDirectory
in interfaceConfiguration
-
getBaseDirectory
public String getBaseDirectory()
Description copied from interface:Configuration
The base directory of the storage in the file system.- Specified by:
getBaseDirectory
in interfaceConfiguration
-
setDeletionDirectory
public Configuration setDeletionDirectory(String deletionDirectory)
Description copied from interface:Configuration
The deletion directory.- Specified by:
setDeletionDirectory
in interfaceConfiguration
-
getDeletionDirectory
public String getDeletionDirectory()
Description copied from interface:Configuration
The deletion directory.- Specified by:
getDeletionDirectory
in interfaceConfiguration
-
setTruncationDirectory
public Configuration setTruncationDirectory(String truncationDirectory)
Description copied from interface:Configuration
The truncation directory.- Specified by:
setTruncationDirectory
in interfaceConfiguration
-
getTruncationDirectory
public String getTruncationDirectory()
Description copied from interface:Configuration
The truncation directory.- Specified by:
getTruncationDirectory
in interfaceConfiguration
-
setBackupDirectory
public Configuration setBackupDirectory(String backupDirectory)
Description copied from interface:Configuration
The backup directory.- Specified by:
setBackupDirectory
in interfaceConfiguration
-
getBackupDirectory
public String getBackupDirectory()
Description copied from interface:Configuration
The backup directory.- Specified by:
getBackupDirectory
in interfaceConfiguration
-
setChannelCount
public Configuration setChannelCount(int channelCount)
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
public Configuration setChannelDirectoryPrefix(String channelDirectoryPrefix)
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
public String getChannelDirectoryPrefix()
Description copied from interface:Configuration
Name prefix of the subdirectories used by the channel threads.- Specified by:
getChannelDirectoryPrefix
in interfaceConfiguration
-
setDataFilePrefix
public Configuration setDataFilePrefix(String dataFilePrefix)
Description copied from interface:Configuration
Name prefix of the storage files. Default is"channel_"
.- Specified by:
setDataFilePrefix
in interfaceConfiguration
- Parameters:
dataFilePrefix
- new prefix
-
getDataFilePrefix
public String getDataFilePrefix()
Description copied from interface:Configuration
Name prefix of the storage files.- Specified by:
getDataFilePrefix
in interfaceConfiguration
-
setDataFileSuffix
public Configuration setDataFileSuffix(String dataFileSuffix)
Description copied from interface:Configuration
Name suffix of the storage files. Default is".dat"
.- Specified by:
setDataFileSuffix
in interfaceConfiguration
- Parameters:
dataFileSuffix
- new suffix
-
getDataFileSuffix
public String getDataFileSuffix()
Description copied from interface:Configuration
Name suffix of the storage files.- Specified by:
getDataFileSuffix
in interfaceConfiguration
-
setTransactionFilePrefix
public Configuration setTransactionFilePrefix(String transactionFilePrefix)
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
public String getTransactionFilePrefix()
Description copied from interface:Configuration
Name prefix of the storage transaction file.- Specified by:
getTransactionFilePrefix
in interfaceConfiguration
-
setTransactionFileSuffix
public Configuration setTransactionFileSuffix(String transactionFileSuffix)
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
public String getTransactionFileSuffix()
Description copied from interface:Configuration
Name suffix of the storage transaction file.- Specified by:
getTransactionFileSuffix
in interfaceConfiguration
-
setTypeDictionaryFilename
public Configuration setTypeDictionaryFilename(String typeDictionaryFilename)
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
public String getTypeDictionaryFilename()
Description copied from interface:Configuration
The name of the dictionary file.- Specified by:
getTypeDictionaryFilename
in interfaceConfiguration
-
setHouseKeepingInterval
public Configuration setHouseKeepingInterval(long houseKeepingInterval)
Description copied from interface:Configuration
Interval 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:
setHouseKeepingInterval
in interfaceConfiguration
- Parameters:
houseKeepingInterval
- the new interval- See Also:
Configuration.setHouseKeepingNanoTimeBudget(long)
-
getHouseKeepingInterval
public long getHouseKeepingInterval()
Description copied from interface:Configuration
Interval in milliseconds for the houskeeping. This is work like garbage collection or cache checking.- Specified by:
getHouseKeepingInterval
in interfaceConfiguration
- See Also:
Configuration.getHouseKeepingNanoTimeBudget()
-
setHouseKeepingNanoTimeBudget
public Configuration setHouseKeepingNanoTimeBudget(long houseKeepingNanoTimeBudget)
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:
setHouseKeepingNanoTimeBudget
in interfaceConfiguration
- Parameters:
houseKeepingNanoTimeBudget
- the new time budget- See Also:
Configuration.setHouseKeepingInterval(long)
-
getHouseKeepingNanoTimeBudget
public long getHouseKeepingNanoTimeBudget()
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:
getHouseKeepingNanoTimeBudget
in interfaceConfiguration
- See Also:
Configuration.getHouseKeepingInterval()
-
setEntityCacheThreshold
public Configuration setEntityCacheThreshold(long entityCacheThreshold)
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
-
setEntityCacheTimeout
public Configuration setEntityCacheTimeout(long entityCacheTimeout)
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:
setEntityCacheTimeout
in interfaceConfiguration
- See Also:
Duration
-
getEntityCacheTimeout
public long getEntityCacheTimeout()
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:
getEntityCacheTimeout
in interfaceConfiguration
-
setDataFileMinSize
public Configuration setDataFileMinSize(int dataFileMinSize)
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:
setDataFileMinSize
in interfaceConfiguration
- Parameters:
dataFileMinSize
- the new minimum file size- See Also:
Configuration.setDataFileDissolveRatio(double)
-
getDataFileMinSize
public int getDataFileMinSize()
Description copied from interface:Configuration
Minimum file size for a data file to avoid cleaning it up.- Specified by:
getDataFileMinSize
in interfaceConfiguration
- See Also:
Configuration.getDataFileDissolveRatio()
-
setDataFileMaxSize
public Configuration setDataFileMaxSize(int dataFileMaxSize)
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:
setDataFileMaxSize
in interfaceConfiguration
- Parameters:
dataFileMaxSize
- the new maximum file size- See Also:
Configuration.setDataFileDissolveRatio(double)
-
getDataFileMaxSize
public int getDataFileMaxSize()
Description copied from interface:Configuration
Maximum file size for a data file to avoid cleaning it up.- Specified by:
getDataFileMaxSize
in interfaceConfiguration
- See Also:
Configuration.getDataFileDissolveRatio()
-
setDataFileDissolveRatio
public Configuration setDataFileDissolveRatio(double dataFileDissolveRatio)
Description copied from interface:Configuration
The 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:
setDataFileDissolveRatio
in interfaceConfiguration
- Parameters:
dataFileDissolveRatio
- the new dissolve ration
-
getDataFileDissolveRatio
public double getDataFileDissolveRatio()
Description copied from interface:Configuration
The 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:
getDataFileDissolveRatio
in interfaceConfiguration
-
-