Interface Configuration

    • Method Detail

      • 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.
      • setBackupDirectoryInUserHome

        default Configuration setBackupDirectoryInUserHome​(String backupDirectoryInUserHome)
        The backup directory.
        Parameters:
        backupDirectoryInUserHome - relative location in the user home 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 is 1.
        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 with setHouseKeepingNanoTimeBudget(long) the maximum processor time for housekeeping work can be set. Default is 1000 (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 is 10000000 (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. See StorageEntityCacheEvaluator. Default is 1000000000.
        Parameters:
        entityCacheThreshold - the new threshold
      • getEntityCacheThreshold

        long getEntityCacheThreshold()
        Abstract threshold value for the lifetime of entities in the cache. See StorageEntityCacheEvaluator.
      • 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 is 86400000 (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 is 0.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