Class Storage
public final class Storage extends Object
To setup and start a database, see the class "EmbeddedStorage".
- See Also:
Persistence
,StorageChannel
-
Method Summary
-
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
Creates a newStorageLiveFileProvider
.For a detailed explanation see
StorageLiveFileProvider.New()
. -
FileProvider
Deprecated.replaced byFileProvider(Path)
Alias forFileProvider(storageDirectory.toPath())
-
FileProvider
Creates a newStorageLiveFileProvider
.For a detailed explanation see
StorageLiveFileProvider.New(ADirectory)
. -
FileProvider
-
FileProviderBuilder
Creates a newStorageLiveFileProvider.Builder
.For a detailed explanation see
StorageLiveFileProvider.Builder()
. -
FileProviderBuilder
Creates a newStorageLiveFileProvider.Builder
.For a detailed explanation see
StorageLiveFileProvider.Builder(AFileSystem)
. -
BackupFileProvider
-
BackupFileProvider
@Deprecated public static final StorageBackupFileProvider BackupFileProvider(File storageDirectory)Deprecated. -
BackupFileProvider
-
BackupFileProvider
-
BackupFileProviderBuilder
-
BackupFileProviderBuilder
public static final StorageBackupFileProvider.Builder<?> BackupFileProviderBuilder(AFileSystem fileSystem) -
Configuration
Creates a newStorageConfiguration
.For a detailed explanation see
StorageConfiguration.New()
. -
Configuration
Creates a newStorageConfiguration
.For a detailed explanation see
StorageConfiguration.New(StorageLiveFileProvider)
. -
ConfigurationBuilder
Creates a newStorageConfiguration.Builder
.For a detailed explanation see
StorageConfiguration.Builder()
. -
HousekeepingController
Creates a newStorageHousekeepingController
.For a detailed explanation see
StorageHousekeepingController.New()
. -
HousekeepingController
public static final StorageHousekeepingController HousekeepingController(long housekeepingIntervalMs, long housekeepingTimeBudgetNs)Creates a newStorageHousekeepingController
.For a detailed explanation see
StorageHousekeepingController.New(long, long)
. -
EntityCacheEvaluator
Creates a newStorageEntityCacheEvaluator
.For a detailed explanation see
StorageEntityCacheEvaluator.New()
. -
EntityCacheEvaluator
Creates a newStorageEntityCacheEvaluator
.For a detailed explanation see
StorageEntityCacheEvaluator.New(long)
. -
EntityCacheEvaluator
public static final StorageEntityCacheEvaluator EntityCacheEvaluator(long timeoutMs, long threshold)Creates a newStorageEntityCacheEvaluator
.For a detailed explanation see
StorageEntityCacheEvaluator.New(long, long)
. -
ChannelCountProvider
Creates a newStorageChannelCountProvider
.For a detailed explanation see
StorageChannelCountProvider.New()
. -
ChannelCountProvider
Creates a newStorageChannelCountProvider
.For a detailed explanation see
StorageChannelCountProvider.New(int)
. -
DataFileEvaluator
Creates a newStorageDataFileEvaluator
.For a detailed explanation see
StorageDataFileEvaluator.New()
. -
DataFileEvaluator
public static final StorageDataFileEvaluator DataFileEvaluator(int fileMinimumSize, int fileMaximumSize)Creates a newStorageDataFileEvaluator
.For a detailed explanation see
StorageDataFileEvaluator.New(int, int)
. -
DataFileEvaluator
public static final StorageDataFileEvaluator DataFileEvaluator(int fileMinimumSize, int fileMaximumSize, double minimumUseRatio)Creates a newStorageDataFileEvaluator
.For a detailed explanation see
StorageDataFileEvaluator.New(int, int, double)
. -
DataFileEvaluator
public static final StorageDataFileEvaluator DataFileEvaluator(int fileMinimumSize, int fileMaximumSize, double minimumUseRatio, boolean cleanUpHeadFile)Creates a newStorageDataFileEvaluator
.For a detailed explanation see
StorageDataFileEvaluator.New(int, int, double, boolean)
. -
BackupSetup
Deprecated.replaced byBackupSetup(Path)
-
BackupSetup
Creates a newStorageBackupSetup
.For a detailed explanation see
StorageBackupSetup.New(ADirectory)
. -
BackupSetup
Creates a newStorageBackupSetup
.For a detailed explanation see
StorageBackupSetup.New(ADirectory)
. -
BackupSetup
Creates a newStorageBackupSetup
.For a detailed explanation see
StorageBackupSetup.New(ADirectory)
. -
BackupSetup
Creates a newStorageBackupSetup
.For a detailed explanation see
StorageBackupSetup.New(StorageBackupFileProvider)
. -
LockFileSetupProvider
Creates a newStorageLockFileSetup.Provider
.For a detailed explanation see
StorageLockFileSetup.Provider()
. -
LockFileSetupProvider
Creates a newStorageLockFileSetup.Provider
.For a detailed explanation see
StorageLockFileSetup.Provider(Charset)
. -
LockFileSetupProvider
Creates a newStorageLockFileSetup.Provider
.For a detailed explanation see
StorageLockFileSetup.Provider(long)
. -
LockFileSetupProvider
public static StorageLockFileSetup.Provider LockFileSetupProvider(Charset charset, long updateInterval)Creates a newStorageLockFileSetup.Provider
.For a detailed explanation see
StorageLockFileSetup.Provider(Charset, long)
. -
consolidate
public static final <C extends StorageConnection> C consolidate(C storageConnection, StorageEntityCacheEvaluator entityEvaluator)Consolidates the storage system represented by the passedStorageConnection
by calling
StorageConnection.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.
-