Interface Configuration
-
- All Known Implementing Classes:
Configuration.Default
public interface Configuration
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
Configuration.Default
-
Method Summary
Modifier and Type Method Description default EmbeddedStorageFoundation<?>
createEmbeddedStorageFoundation()
static Configuration
Default()
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.static Configuration
LoadIni(File file)
static Configuration
LoadIni(File file, Charset charset)
static Configuration
LoadIni(InputStream inputStream)
static Configuration
LoadIni(InputStream inputStream, Charset charset)
static Configuration
LoadIni(URL url)
static Configuration
LoadIni(URL url, Charset charset)
static Configuration
LoadXml(File file)
static Configuration
LoadXml(File file, Charset charset)
static Configuration
LoadXml(InputStream inputStream)
static Configuration
LoadXml(InputStream inputStream, Charset charset)
static Configuration
LoadXml(URL url)
static Configuration
LoadXml(URL url, Charset charset)
Configuration
setBackupDirectory(String backupDirectory)
The backup directory.Configuration
setBaseDirectory(String baseDirectory)
The base directory of the storage in the file system.default Configuration
setBaseDirectoryInUserHome(String baseDirectoryInUserHome)
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.
-
-
-
Method Detail
-
LoadIni
static Configuration LoadIni(File file)
-
LoadIni
static Configuration LoadIni(File file, Charset charset)
-
LoadIni
static Configuration LoadIni(URL url)
-
LoadIni
static Configuration LoadIni(URL url, Charset charset)
-
LoadIni
static Configuration LoadIni(InputStream inputStream)
-
LoadIni
static Configuration LoadIni(InputStream inputStream, Charset charset)
-
LoadXml
static Configuration LoadXml(File file)
-
LoadXml
static Configuration LoadXml(File file, Charset charset)
-
LoadXml
static Configuration LoadXml(URL url)
-
LoadXml
static Configuration LoadXml(URL url, Charset charset)
-
LoadXml
static Configuration LoadXml(InputStream inputStream)
-
LoadXml
static Configuration LoadXml(InputStream inputStream, Charset charset)
-
createEmbeddedStorageFoundation
default EmbeddedStorageFoundation<?> createEmbeddedStorageFoundation()
-
setBaseDirectory
Configuration setBaseDirectory(String baseDirectory)
The base directory of the storage in the file system.
-
setBaseDirectoryInUserHome
default Configuration setBaseDirectoryInUserHome(String baseDirectoryInUserHome)
The base directory of the storage in the file system.- Parameters:
baseDirectoryInUserHome
- relative location in the user home directory
-
getBaseDirectory
String getBaseDirectory()
The base directory of the storage in the file system.
-
setDeletionDirectory
Configuration setDeletionDirectory(String deletionDirectory)
The deletion directory.
-
getDeletionDirectory
String getDeletionDirectory()
The deletion directory.
-
setTruncationDirectory
Configuration setTruncationDirectory(String truncationDirectory)
The truncation directory.
-
getTruncationDirectory
String getTruncationDirectory()
The truncation directory.
-
setBackupDirectory
Configuration setBackupDirectory(String backupDirectory)
The backup directory.
-
getBackupDirectory
String getBackupDirectory()
The backup directory.
-
setChannelCount
Configuration setChannelCount(int channelCount)
The number of threads and number of directories used by the storage engine. Every thread has exclusive access to its directory. Default is1
.- Parameters:
channelCount
- the new channel count, must be a power of 2
-
getChannelCount
int getChannelCount()
The number of threads and number of directories used by the storage engine. Every thread has exclusive access to its directory.
-
setChannelDirectoryPrefix
Configuration setChannelDirectoryPrefix(String channelDirectoryPrefix)
Name prefix of the subdirectories used by the channel threads. Default is"channel_"
.- Parameters:
channelDirectoryPrefix
- new prefix
-
getChannelDirectoryPrefix
String getChannelDirectoryPrefix()
Name prefix of the subdirectories used by the channel threads.
-
setDataFilePrefix
Configuration setDataFilePrefix(String dataFilePrefix)
Name prefix of the storage files. Default is"channel_"
.- Parameters:
dataFilePrefix
- new prefix
-
getDataFilePrefix
String getDataFilePrefix()
Name prefix of the storage files.
-
setDataFileSuffix
Configuration setDataFileSuffix(String dataFileSuffix)
Name suffix of the storage files. Default is".dat"
.- Parameters:
dataFileSuffix
- new suffix
-
getDataFileSuffix
String getDataFileSuffix()
Name suffix of the storage files.
-
setTransactionFilePrefix
Configuration setTransactionFilePrefix(String transactionFilePrefix)
Name prefix of the storage transaction file. Default is"transactions_"
.- Parameters:
transactionFilePrefix
- new prefix
-
getTransactionFilePrefix
String getTransactionFilePrefix()
Name prefix of the storage transaction file.
-
setTransactionFileSuffix
Configuration setTransactionFileSuffix(String transactionFileSuffix)
Name suffix of the storage transaction file. Default is".sft"
.- Parameters:
transactionFileSuffix
- new suffix
-
getTransactionFileSuffix
String getTransactionFileSuffix()
Name suffix of the storage transaction file.
-
setTypeDictionaryFilename
Configuration setTypeDictionaryFilename(String typeDictionaryFilename)
The name of the dictionary file. Default is"PersistenceTypeDictionary.ptd"
.- Parameters:
typeDictionaryFilename
- new name
-
getTypeDictionaryFilename
String getTypeDictionaryFilename()
The name of the dictionary file.
-
setHouseKeepingInterval
Configuration setHouseKeepingInterval(long houseKeepingInterval)
Interval in milliseconds for the houskeeping. This is work like garbage collection or cache checking. In combination withsetHouseKeepingNanoTimeBudget(long)
the maximum processor time for housekeeping work can be set. Default is1000
(every second).- Parameters:
houseKeepingInterval
- the new interval- See Also:
setHouseKeepingNanoTimeBudget(long)
-
getHouseKeepingInterval
long getHouseKeepingInterval()
Interval in milliseconds for the houskeeping. This is work like garbage collection or cache checking.- See Also:
getHouseKeepingNanoTimeBudget()
-
setHouseKeepingNanoTimeBudget
Configuration setHouseKeepingNanoTimeBudget(long houseKeepingNanoTimeBudget)
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).- Parameters:
houseKeepingNanoTimeBudget
- the new time budget- See Also:
setHouseKeepingInterval(long)
-
getHouseKeepingNanoTimeBudget
long getHouseKeepingNanoTimeBudget()
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.- See Also:
getHouseKeepingInterval()
-
setEntityCacheThreshold
Configuration setEntityCacheThreshold(long entityCacheThreshold)
Abstract threshold value for the lifetime of entities in the cache. SeeStorageEntityCacheEvaluator
. Default is1000000000
.- Parameters:
entityCacheThreshold
- the new threshold
-
getEntityCacheThreshold
long getEntityCacheThreshold()
Abstract threshold value for the lifetime of entities in the cache. SeeStorageEntityCacheEvaluator
.
-
setEntityCacheTimeout
Configuration setEntityCacheTimeout(long entityCacheTimeout)
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).- Parameters:
entityCacheTimeout
-- See Also:
Duration
-
getEntityCacheTimeout
long getEntityCacheTimeout()
Timeout in milliseconds for the entity cache evaluator. If an entity wasn't accessed in this timespan it will be removed from the cache.
-
setDataFileMinSize
Configuration setDataFileMinSize(int dataFileMinSize)
Minimum file size for a data file to avoid cleaning it up. Default is 1024^2 = 1 MiB.- Parameters:
dataFileMinSize
- the new minimum file size- See Also:
setDataFileDissolveRatio(double)
-
getDataFileMinSize
int getDataFileMinSize()
Minimum file size for a data file to avoid cleaning it up.- See Also:
getDataFileDissolveRatio()
-
setDataFileMaxSize
Configuration setDataFileMaxSize(int dataFileMaxSize)
Maximum file size for a data file to avoid cleaning it up. Default is 1024^2*8 = 8 MiB.- Parameters:
dataFileMaxSize
- the new maximum file size- See Also:
setDataFileDissolveRatio(double)
-
getDataFileMaxSize
int getDataFileMaxSize()
Maximum file size for a data file to avoid cleaning it up.- See Also:
getDataFileDissolveRatio()
-
setDataFileDissolveRatio
Configuration setDataFileDissolveRatio(double dataFileDissolveRatio)
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%).- Parameters:
dataFileDissolveRatio
- the new dissolve ration
-
getDataFileDissolveRatio
double getDataFileDissolveRatio()
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
static Configuration Default()
-
-