Class Storage
public final class Storage extends Object
To setup and start a database, see the class "EmbeddedStorage".
- See Also:
Persistence
,StorageChannel
-
Constructor Summary
Constructors Constructor Description Storage()
-
Method Summary
Modifier and Type Method Description static StorageBackupFileProvider
BackupFileProvider()
static StorageBackupFileProvider
BackupFileProvider(File storageDirectory)
Deprecated.static StorageBackupFileProvider
BackupFileProvider(Path storageDirectory)
static StorageBackupFileProvider
BackupFileProvider(ADirectory storageDirectory)
static StorageBackupFileProvider.Builder<?>
BackupFileProviderBuilder()
static StorageBackupFileProvider.Builder<?>
BackupFileProviderBuilder(AFileSystem fileSystem)
static StorageBackupSetup
BackupSetup(File backupDirectory)
Deprecated.replaced byBackupSetup(Path)
static StorageBackupSetup
BackupSetup(String backupDirectoryPath)
Pseudo-constructor method to create a newStorageBackupSetup
instance using the passed directory as the backup location.static StorageBackupSetup
BackupSetup(Path backupDirectory)
Pseudo-constructor method to create a newStorageBackupSetup
instance using the passed directory as the backup location.static StorageBackupSetup
BackupSetup(ADirectory backupDirectory)
Pseudo-constructor method to create a newStorageBackupSetup
instance using the passed directory as the backup location.static StorageBackupSetup
BackupSetup(StorageBackupFileProvider backupFileProvider)
Pseudo-constructor method to create a newStorageBackupSetup
instance using the passedStorageLiveFileProvider
.static StorageChannelCountProvider
ChannelCountProvider()
Pseudo-constructor method to create a newStorageChannelCountProvider
instance using default values defined byStorageChannelCountProvider.Defaults
.static StorageChannelCountProvider
ChannelCountProvider(int channelCount)
Pseudo-constructor method to create a newStorageChannelCountProvider
instance using the passed value.static StorageConfiguration
Configuration()
Pseudo-constructor method to create a newStorageConfiguration
instance usingnull
as theStorageBackupSetup
part and default instances for everything else.static StorageConfiguration
Configuration(StorageLiveFileProvider fileProvider)
Pseudo-constructor method to create a newStorageConfiguration
instance using the passedStorageLiveFileProvider
,null
as theStorageBackupSetup
part and default instances for everything else.static StorageConfiguration.Builder<?>
ConfigurationBuilder()
Pseudo-constructor method to create a newStorageConfiguration.Builder
instance.static <C extends StorageConnection>
Cconsolidate(C storageConnection)
Callsconsolidate(StorageConnection,StorageEntityCacheEvaluator)
with null as additional parameters (causing live configuration to be used instead).static <C extends StorageConnection>
Cconsolidate(C storageConnection, StorageEntityCacheEvaluator entityEvaluator)
Consolidates the storage system represented by the passedStorageConnection
by callingStorageConnection.issueFullGarbageCollection()
StorageConnection.issueFullFileCheck()
StorageConnection.issueFullCacheCheck(StorageEntityCacheEvaluator)
in that order.static StorageDataFileEvaluator
DataFileEvaluator()
Pseudo-constructor method to create a newStorageDataFileEvaluator
instance using default values specified byStorageDataFileEvaluator.Defaults
.static StorageDataFileEvaluator
DataFileEvaluator(int fileMinimumSize, int fileMaximumSize)
Pseudo-constructor method to create a newStorageDataFileEvaluator
instance using the passed values and default values specified byStorageDataFileEvaluator.Defaults
.static StorageDataFileEvaluator
DataFileEvaluator(int fileMinimumSize, int fileMaximumSize, double minimumUseRatio)
Pseudo-constructor method to create a newStorageDataFileEvaluator
instance using the passed values.static StorageDataFileEvaluator
DataFileEvaluator(int fileMinimumSize, int fileMaximumSize, double minimumUseRatio, boolean cleanUpHeadFile)
Pseudo-constructor method to create a newStorageDataFileEvaluator
instance using the passed values and default values specified byStorageDataFileEvaluator.Defaults
.static NioFileSystem
DefaultFileSystem()
static ADirectory
defaultStorageDirectory()
static ADirectory
defaultStorageDirectory(AFileSystem fileSystem)
Returns the default storage directory in the current working directory and with a filename defined byStorageLiveFileProvider.Defaults.defaultStorageDirectory()
.static StorageEntityCacheEvaluator
EntityCacheEvaluator()
Pseudo-constructor method to create a newStorageEntityCacheEvaluator
instance using default values defined byStorageEntityCacheEvaluator.Defaults
.static StorageEntityCacheEvaluator
EntityCacheEvaluator(long timeoutMs)
Pseudo-constructor method to create a newStorageEntityCacheEvaluator
instance using the passed value and default values defined byStorageEntityCacheEvaluator.Defaults
.static StorageEntityCacheEvaluator
EntityCacheEvaluator(long timeoutMs, long threshold)
Pseudo-constructor method to create a newStorageEntityCacheEvaluator
instance using the passed values.static StorageLiveFileProvider
FileProvider()
Pseudo-constructor method to create a newStorageLiveFileProvider
instance with default values provided byStorageLiveFileProvider.Defaults
.static StorageLiveFileProvider
FileProvider(File storageDirectory)
Deprecated.replaced byFileProvider(Path)
static StorageLiveFileProvider
FileProvider(Path storageDirectory)
Pseudo-constructor method to create a newStorageLiveFileProvider
instance with the passed file as the storage directory and defaults provided byStorageLiveFileProvider.Defaults
.static StorageLiveFileProvider
FileProvider(ADirectory storageDirectory)
static StorageLiveFileProvider.Builder<?>
FileProviderBuilder()
Pseudo-constructor method to create a newStorageLiveFileProvider.Builder
instance with the default file system.static StorageLiveFileProvider.Builder<?>
FileProviderBuilder(AFileSystem fileSystem)
static StorageHousekeepingController
HousekeepingController()
Pseudo-constructor method to create a newStorageHousekeepingController
instance using default values defined byStorageHousekeepingController.Defaults
.static StorageHousekeepingController
HousekeepingController(long housekeepingIntervalMs, long housekeepingTimeBudgetNs)
Pseudo-constructor method to create a newStorageHousekeepingController
instance using the passed values.static StorageLockFileSetup.Provider
LockFileSetupProvider()
Pseudo-constructor method to create a newStorageLockFileSetup.Provider
instance using default values specified byStorageLockFileSetup.Defaults
.static StorageLockFileSetup.Provider
LockFileSetupProvider(long updateInterval)
Pseudo-constructor method to create a newStorageLockFileSetup.Provider
instance using the passed values and default values specified byStorageLockFileSetup.Defaults
.static StorageLockFileSetup.Provider
LockFileSetupProvider(Charset charset)
Pseudo-constructor method to create a newStorageLockFileSetup.Provider
instance using the passed values and default values specified byStorageLockFileSetup.Defaults
.static StorageLockFileSetup.Provider
LockFileSetupProvider(Charset charset, long updateInterval)
Pseudo-constructor method to create a newProvider
instance using the passed values.
-
Constructor Details
-
Storage
public Storage()
-
-
Method Details
-
DefaultFileSystem
-
defaultStorageDirectory
-
defaultStorageDirectory
Returns the default storage directory in the current working directory and with a filename defined byStorageLiveFileProvider.Defaults.defaultStorageDirectory()
.- Returns:
- the default storage directory located in the current working directory.
-
FileProvider
Pseudo-constructor method to create a newStorageLiveFileProvider
instance with default values provided byStorageLiveFileProvider.Defaults
.For explanations and customizing values, see
StorageLiveFileProvider.Builder
.- Returns:
- a new
StorageLiveFileProvider
instance. - See Also:
FileProvider(Path)
,StorageLiveFileProvider.New()
,StorageLiveFileProvider.Builder
,StorageLiveFileProvider.Defaults
-
FileProvider
Deprecated.replaced byFileProvider(Path)
Alias forFileProvider(storageDirectory.toPath())
- Parameters:
storageDirectory
- the directory where the storage will be located.- Returns:
- a new
StorageLiveFileProvider
instance.
-
FileProvider
Pseudo-constructor method to create a newStorageLiveFileProvider
instance with the passed file as the storage directory and defaults provided byStorageLiveFileProvider.Defaults
.For explanations and customizing values, see
StorageLiveFileProvider.Builder
.- Parameters:
storageDirectory
- the directory where the storage will be located.- Returns:
- a new
StorageLiveFileProvider
instance. - See Also:
FileProvider()
,StorageLiveFileProvider#New(Path)
,StorageLiveFileProvider.Builder
,StorageLiveFileProvider.Defaults
-
FileProvider
-
FileProviderBuilder
Pseudo-constructor method to create a newStorageLiveFileProvider.Builder
instance with the default file system.For explanations and customizing values, see
StorageLiveFileProvider.Builder
.- Returns:
- a new
StorageLiveFileProvider.Builder
instance. - See Also:
FileProvider()
,FileProvider(Path)
,StorageLiveFileProvider.Builder
-
FileProviderBuilder
-
BackupFileProvider
-
BackupFileProvider
@Deprecated public static final StorageBackupFileProvider BackupFileProvider(File storageDirectory)Deprecated. -
BackupFileProvider
-
BackupFileProvider
-
BackupFileProviderBuilder
-
BackupFileProviderBuilder
public static final StorageBackupFileProvider.Builder<?> BackupFileProviderBuilder(AFileSystem fileSystem) -
Configuration
Pseudo-constructor method to create a newStorageConfiguration
instance usingnull
as theStorageBackupSetup
part and default instances for everything else.For explanations and customizing values, see
StorageConfiguration.Builder
.- Returns:
- a new
StorageConfiguration
instance. - See Also:
Configuration(StorageLiveFileProvider)
,StorageConfiguration.New()
,StorageConfiguration.Builder
-
Configuration
Pseudo-constructor method to create a newStorageConfiguration
instance using the passedStorageLiveFileProvider
,null
as theStorageBackupSetup
part and default instances for everything else.For explanations and customizing values, see
StorageConfiguration.Builder
.- Parameters:
fileProvider
- theStorageLiveFileProvider
to provide directory and file names.- Returns:
- a new
StorageConfiguration
instance. - See Also:
Configuration()
,StorageConfiguration.New(StorageLiveFileProvider)
,StorageConfiguration.Builder
-
ConfigurationBuilder
Pseudo-constructor method to create a newStorageConfiguration.Builder
instance.For explanations and customizing values, see
StorageConfiguration.Builder
.- Returns:
- a new
StorageConfiguration.Builder
instance. - See Also:
Configuration()
,Configuration(StorageLiveFileProvider)
,StorageConfiguration.Builder()
,StorageConfiguration.Builder
-
HousekeepingController
Pseudo-constructor method to create a newStorageHousekeepingController
instance using default values defined byStorageHousekeepingController.Defaults
.- Returns:
- a new
StorageHousekeepingController
instance. - See Also:
HousekeepingController(long,long)
,StorageHousekeepingController.New()
,StorageHousekeepingController.Defaults
-
HousekeepingController
public static final StorageHousekeepingController HousekeepingController(long housekeepingIntervalMs, long housekeepingTimeBudgetNs)Pseudo-constructor method to create a newStorageHousekeepingController
instance using the passed values.The combination of these two values can be used to define how much percentage of the system's computing power shall be used for storage housekeeping.
Example:
10 Million ns (= 10 ms) housekeeping budget every 1000 ms means (roughly) 1% of the computing power will be used for storage housekeeping.Note that in an application where no store occures over a longer period of time, all housekeeping tasks will eventually be completed, reducing the required computing power to 0. When the next store occurs, the housekeeping starts anew.
How long the housekeeping requires to complete depends on the computing power it is granted by theStorageHousekeepingController
, other configurations (like entity data cache timeouts) and the amount of data that has to be managed.See all "issue~" methods in
StorageConnection
for a way to call housekeeping actions explicitly and causing them to be executed completely.- Parameters:
housekeepingIntervalMs
- the interval in milliseconds that the storage threads shallexecute their various housekeeping actions (like cache clearing checks, file consolidation, etc.).Must be greater than zero.housekeepingTimeBudgetNs
- the time budget in nanoseconds that each storage thread will use to performa housekeeping action. This is a best effort value, not a strictly reliable border value. This meansa housekeeping action can occasionally take slightly longer than specified here.Must be greater than zero.- Returns:
- a new
StorageHousekeepingController
instance. - See Also:
HousekeepingController()
,StorageHousekeepingController.New(long,long)
-
EntityCacheEvaluator
Pseudo-constructor method to create a newStorageEntityCacheEvaluator
instance using default values defined byStorageEntityCacheEvaluator.Defaults
.For explanations and customizing values, see
StorageEntityCacheEvaluator.New(long,long)
.- Returns:
- a new
StorageEntityCacheEvaluator
instance.. - See Also:
EntityCacheEvaluator(long)
,EntityCacheEvaluator(long,long)
,StorageEntityCacheEvaluator.New()
-
EntityCacheEvaluator
Pseudo-constructor method to create a newStorageEntityCacheEvaluator
instance using the passed value and default values defined byStorageEntityCacheEvaluator.Defaults
.For explanations and customizing values, see
StorageEntityCacheEvaluator.New(long,long)
.- Parameters:
timeoutMs
- the time (in milliseconds, greater than 0) of not being read (the "age"), after which a particularentity's data will be cleared from the Storage's internal cache.- Returns:
- a new
StorageEntityCacheEvaluator
instance. - See Also:
EntityCacheEvaluator()
,EntityCacheEvaluator(long,long)
,StorageEntityCacheEvaluator.New(long)
-
EntityCacheEvaluator
public static final StorageEntityCacheEvaluator EntityCacheEvaluator(long timeoutMs, long threshold)Pseudo-constructor method to create a newStorageEntityCacheEvaluator
instance using the passed values.In the default implementation, two values are combined to calculate an entity's "cache weight": its "age" (the time in milliseconds of not being read) and its size in bytes. The resulting value is in turn compared to an abstract "free space" value, calculated by subtracting the current total cache size in bytes from the abstract threshold value defined here. If this comparison deems the tested entity to be "too heavy" for the cache, its data is cleared from the cache. It is also cleared from the cache if its "age" is greater than the timeout defined here.
This is a relatively simple and extremely fast algorithm to create the following behavior:
- Cached data that seems to not be used currently ("too old") is cleared.
- Apart from that, as long as there is "enough space", nothing is cleared.
- The old and bigger an entity's data is, the more likely it is to be cleared.
- The less free space there is in the cache, the sooner cached entity data is cleared.
- Parameters:
timeoutMs
- the time (in milliseconds, greater than 0) of not being read (the "age"), after which a particularentity's data will be cleared from the Storage's internal cache.threshold
- an abstract value (greater than 0) to evaluate the product of size and age of an entity in relationto the current cache size in order to determine if the entity's data shall be cleared from the cache.- Returns:
- a new
StorageEntityCacheEvaluator
instance. - See Also:
EntityCacheEvaluator()
,EntityCacheEvaluator(long)
,StorageEntityCacheEvaluator.New(long,long)
-
ChannelCountProvider
Pseudo-constructor method to create a newStorageChannelCountProvider
instance using default values defined byStorageChannelCountProvider.Defaults
.For explanations and customizing values, see
StorageChannelCountProvider.New(int)
.- Returns:
- a new
StorageChannelCountProvider
instance. - See Also:
ChannelCountProvider(int)
,StorageChannelCountProvider.New()
-
ChannelCountProvider
Pseudo-constructor method to create a newStorageChannelCountProvider
instance using the passed value.A "channel" is the combination of exclusive storage
Thread
maintaining an entity registry, data cache, and the like and a storage directory containing storage data files exclusively used by that thread.
The more channels there are, the more parallel loading and storing operations will be executed and the faster the application will become, provided a hardware that can effectively execute that many threads.Since channels use bitwise modulo hashing, the number of channels must always be a 2^n number with n greater than or equal 0.
(Meaning 1, 2, 4, 8, 16, etc.)- Parameters:
channelCount
- the number of channels. Must be a 2^n number with n greater than or equal 0.- Returns:
- a new
StorageChannelCountProvider
instance.
-
DataFileEvaluator
Pseudo-constructor method to create a newStorageDataFileEvaluator
instance using default values specified byStorageDataFileEvaluator.Defaults
.For explanations and customizing values, see
StorageDataFileEvaluator.New(int,int,double)
.- Returns:
- a new
StorageDataFileEvaluator
instance. - See Also:
DataFileEvaluator(int,int)
,DataFileEvaluator(int,int,double)
,StorageDataFileEvaluator.New()
-
DataFileEvaluator
public static final StorageDataFileEvaluator DataFileEvaluator(int fileMinimumSize, int fileMaximumSize)Pseudo-constructor method to create a newStorageDataFileEvaluator
instance using the passed values and default values specified byStorageDataFileEvaluator.Defaults
.For explanations and customizing values, see
StorageDataFileEvaluator.New(int,int,double)
.- Parameters:
fileMinimumSize
- the minimum file size in bytes that a single storage file must have. Smaller fileswill be dissolved.fileMaximumSize
- the maximum file size in bytes that a single storage file may have. Larger fileswill be dissolved.
Note that a file can exceed this limit if it contains a single entity that already exceeds the limit.E.g. an int array with 10 million elements would be about 40 MB in size and would exceed a file sizelimit of, for example, 30 MB.- Returns:
- a new
StorageDataFileEvaluator
instance. - See Also:
DataFileEvaluator()
,DataFileEvaluator(int,int,double)
,StorageDataFileEvaluator.New(int,int)
-
DataFileEvaluator
public static final StorageDataFileEvaluator DataFileEvaluator(int fileMinimumSize, int fileMaximumSize, double minimumUseRatio)Pseudo-constructor method to create a newStorageDataFileEvaluator
instance using the passed values.A
StorageDataFileEvaluator
is used to evaluate storage data files regarding if they should be desolved, meaning copy all their still needed data to the current head file and then delete the file.
This technique is used to optimize (or "clean up") the occupied storage space: No longer needed data, e.g. of entities that became unreachable or prior versions of a still reachable entity, is considered a logical "gap", that occupies storage space unnecessarily. These "gaps" have to be removed in order to only occupy as much storage space as required.The parameters defined here give an opportunity to configure how "aggressive" this clean up shall be performaned. The trade-off is between acceptale gap sizes and the required performance and disk-writes to clean them up.
Without specifying them, default values will be used, defined inStorageDataFileEvaluator.Defaults
.- Parameters:
fileMinimumSize
- the minimum file size in bytes that a single storage file must have. Smaller fileswill be dissolved.fileMaximumSize
- the maximum file size in bytes that a single storage file may have. Larger fileswill be dissolved.
Note that a file can exceed this limit if it contains a single entity that already exceeds the limit.E.g. an int array with 10 million elements would be about 40 MB in size and would exceed a file sizelimit of, for example, 30 MB.- Returns:
- a new
StorageDataFileEvaluator
instance. - See Also:
DataFileEvaluator()
,DataFileEvaluator(int,int)
,StorageDataFileEvaluator.New(int,int,double)
-
DataFileEvaluator
public static final StorageDataFileEvaluator DataFileEvaluator(int fileMinimumSize, int fileMaximumSize, double minimumUseRatio, boolean cleanUpHeadFile)Pseudo-constructor method to create a newStorageDataFileEvaluator
instance using the passed values and default values specified byStorageDataFileEvaluator.Defaults
.For explanations and customizing values, see
StorageDataFileEvaluator.New(int,int,double)
.- Parameters:
fileMinimumSize
- the minimum file size in bytes that a single storage file must have. Smaller fileswill be dissolved.fileMaximumSize
- the maximum file size in bytes that a single storage file may have. Larger fileswill be dissolved.
Note that a file can exceed this limit if it contains a single entity that already exceeds the limit.E.g. an int array with 10 million elements would be about 40 MB in size and would exceed a file sizelimit of, for example, 30 MB.minimumUseRatio
- the ratio (value in ]0.0;1.0]) of non-gap data contained in a storage file to preventthe 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 lengthas 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 morefile dissolving (data transfers to new files) is required and vice versa.cleanUpHeadFile
- a flag defining wether the current head file (the only file actively written to)shall be subjected to file cleanups as well.- Returns:
- dissolveHeadfile a new
StorageDataFileEvaluator
instance. - See Also:
DataFileEvaluator()
,DataFileEvaluator(int,int)
,DataFileEvaluator(int,int,double)
,StorageDataFileEvaluator.New(int,int,double,boolean)
-
BackupSetup
Deprecated.replaced byBackupSetup(Path)
-
BackupSetup
Pseudo-constructor method to create a newStorageBackupSetup
instance using the passed directory as the backup location.For explanations and customizing values, see
StorageBackupSetup#New(StorageLiveFileProvider)
.- Parameters:
backupDirectory
- the directory where the backup shall be located.- Returns:
- a new
StorageBackupSetup
instance. - See Also:
StorageBackupSetup#New(StorageLiveFileProvider)
,StorageBackupHandler
-
BackupSetup
Pseudo-constructor method to create a newStorageBackupSetup
instance using the passed directory as the backup location.For explanations and customizing values, see
StorageBackupSetup#New(StorageLiveFileProvider)
.- Parameters:
backupDirectory
- the directory where the backup shall be located.- Returns:
- a new
StorageBackupSetup
instance. - See Also:
StorageBackupSetup#New(StorageLiveFileProvider)
,StorageBackupHandler
-
BackupSetup
Pseudo-constructor method to create a newStorageBackupSetup
instance using the passed directory as the backup location.For explanations and customizing values, see
StorageBackupSetup#New(StorageLiveFileProvider)
.- Parameters:
backupDirectoryPath
- the path to the backup directory- Returns:
- a new
StorageBackupSetup
instance. - See Also:
StorageBackupSetup#New(Path)
,StorageBackupSetup#New(StorageLiveFileProvider)
,StorageBackupHandler
-
BackupSetup
Pseudo-constructor method to create a newStorageBackupSetup
instance using the passedStorageLiveFileProvider
.A StorageBackupSetup basically defines where the backup files will be located by the
StorageBackupHandler
.- Parameters:
backupFileProvider
- theStorageBackupFileProvider
to define where the backup files will be located.- Returns:
- a new
StorageBackupSetup
instance. - See Also:
StorageBackupSetup#New(Path)
,StorageBackupHandler
-
LockFileSetupProvider
Pseudo-constructor method to create a newStorageLockFileSetup.Provider
instance using default values specified byStorageLockFileSetup.Defaults
.For explanations and customizing values, see
StorageLockFileSetup.Provider(Charset,long)
.- Returns:
- a new
Provider
instance. - See Also:
StorageLockFileSetup
,LockFileSetupProvider(Charset)
,LockFileSetupProvider(long)
,LockFileSetupProvider(Charset,long)
-
LockFileSetupProvider
Pseudo-constructor method to create a newStorageLockFileSetup.Provider
instance using the passed values and default values specified byStorageLockFileSetup.Defaults
.For explanations and customizing values, see
StorageLockFileSetup.Provider(Charset,long)
.- Parameters:
charset
- theCharset
to be used for the lock file content.- Returns:
- a new
Provider
instance. - See Also:
StorageLockFileSetup
,LockFileSetupProvider()
,LockFileSetupProvider(long)
,LockFileSetupProvider(Charset,long)
-
LockFileSetupProvider
Pseudo-constructor method to create a newStorageLockFileSetup.Provider
instance using the passed values and default values specified byStorageLockFileSetup.Defaults
.For explanations and customizing values, see
StorageLockFileSetup.Provider(Charset,long)
.- Parameters:
updateInterval
- the update interval in ms.- Returns:
- a new
Provider
instance. - See Also:
StorageLockFileSetup
,LockFileSetupProvider()
,LockFileSetupProvider(Charset)
,LockFileSetupProvider(Charset,long)
-
LockFileSetupProvider
public static StorageLockFileSetup.Provider LockFileSetupProvider(Charset charset, long updateInterval)Pseudo-constructor method to create a newProvider
instance using the passed values.A
Provider
instance created by this method provides newStorageLockFileSetup
instances that use the passed Charset and updateInterval.- Parameters:
charset
- theCharset
to be used for the lock file content.updateInterval
- the update interval in ms.- Returns:
- a new
Provider
instance. - See Also:
StorageLockFileSetup
,LockFileSetupProvider()
,LockFileSetupProvider(Charset)
,LockFileSetupProvider(long)
-
consolidate
public static final <C extends StorageConnection> C consolidate(C storageConnection, StorageEntityCacheEvaluator entityEvaluator)Consolidates the storage system represented by the passedStorageConnection
by callingStorageConnection.issueFullGarbageCollection()
StorageConnection.issueFullFileCheck()
StorageConnection.issueFullCacheCheck(StorageEntityCacheEvaluator)
in that order.Depending on the passed functions, this call can do anything from cleaning/optimizing the storage a little to fully reorganize/optimize the storage files, clear the complete cache and making the storage virtually dormant until the next store.
- Parameters:
storageConnection
- The connection to the storage that shall be consolidated.entityEvaluator
- The function evaluating whether to clear an entity from the cache.
May be null to indicate the use of the live configuration as a default.- Returns:
- the passed storageConnection instance.
-
consolidate
Callsconsolidate(StorageConnection,StorageEntityCacheEvaluator)
with null as additional parameters (causing live configuration to be used instead).- Parameters:
storageConnection
- The connection to the storage that shall be consolidated.- Returns:
- the passed storageConnection instance.
-