public static final class StorageConnection.Default extends Object implements StorageConnection, one.microstream.persistence.types.Unpersistable
StorageConnection.Default| Modifier and Type | Method and Description |
|---|---|
StorageRawFileStatistics |
createStorageStatistics()
Creates a
StorageRawFileStatistics instance, (obviously) containing raw file statistics about
every channel in the storage. |
void |
exportChannels(StorageLiveFileProvider fileProvider,
boolean performGarbageCollection)
Exports the data of all channels in the storage by using the passed
StorageLiveFileProvider instance.This is basically a simple file copy applied to all files in the storage, however with the guaranteed safety of no other task / access to the storage's files intervening with the ongoing process. |
StorageEntityTypeExportStatistics |
exportTypes(StorageEntityTypeExportFileProvider exportFileProvider,
Predicate<? super StorageEntityTypeHandler> isExportType)
Exports the entity data of all selected types of all channels into one file per type.
The data will be in the native binary format used internally by the storage. |
void |
importFiles(one.microstream.collections.types.XGettingEnum<one.microstream.afs.types.AFile> importFiles)
Imports all files specified by the passed Enum (ordered set) of
AFile in order.The files are assumed to be in the native binary format used internally by the storage. All entities contained in the specified files will be imported. |
boolean |
issueCacheCheck(long nanoTimeBudget,
StorageEntityCacheEvaluator entityEvaluator)
Same as
StorageConnection.issueCacheCheck(long), but with using the passed StorageEntityCacheEvaluator
logic instead of the configured one. |
boolean |
issueFileCheck(long nanoTimeBudget)
Issues a storage file check to be executed, limited to the time budget in nanoseconds specified
by the passed
nanoTimeBudget.When the time budget is used up, the checking logic will keep the current progress and continue there at the next opportunity. |
void |
issueFullBackup(StorageLiveFileProvider targetFileProvider,
one.microstream.persistence.types.PersistenceTypeDictionaryExporter typeDictionaryExporter)
Issues a full backup of the whole storage to be executed.
|
boolean |
issueGarbageCollection(long nanoTimeBudget)
Issues garbage collection to be executed, limited to the time budget in nanoseconds specified
by the passed
nanoTimeBudget.When the time budget is used up, the garbage collector will keep the current progress and continue there at the next opportunity. |
one.microstream.persistence.types.PersistenceManager<Binary> |
persistenceManager() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcreateEagerStorer, createLazyStorer, createStorer, exportChannels, exportTypes, getObject, issueCacheCheck, issueFullBackup, issueFullCacheCheck, issueFullCacheCheck, issueFullFileCheck, issueFullGarbageCollection, New, store, storeAll, storeAllpublic one.microstream.persistence.types.PersistenceManager<Binary> persistenceManager()
persistenceManager in interface StorageConnectionPersistenceManager used by this StorageConnection.public final boolean issueGarbageCollection(long nanoTimeBudget)
StorageConnectionnanoTimeBudget.issueGarbageCollection in interface StorageConnectionnanoTimeBudget - the time budget in nanoseconds to be used to perform garbage collection.StorageConnection.issueFullGarbageCollection()public final boolean issueFileCheck(long nanoTimeBudget)
StorageConnectionnanoTimeBudget.issueFileCheck in interface StorageConnectionnanoTimeBudget - the time budget in nanoseconds to be used to perform file checking.public final boolean issueCacheCheck(long nanoTimeBudget,
StorageEntityCacheEvaluator entityEvaluator)
StorageConnectionStorageConnection.issueCacheCheck(long), but with using the passed StorageEntityCacheEvaluator
logic instead of the configured one.issueCacheCheck in interface StorageConnectionnanoTimeBudget - the time budget in nanoseconds to be used to perform cache checking.entityEvaluator - the entity cache evaluation logic to be used for the call.StorageConnection.issueFullCacheCheck(),
StorageConnection.issueFullCacheCheck(StorageEntityCacheEvaluator),
StorageConnection.issueCacheCheck(long)public final void issueFullBackup(StorageLiveFileProvider targetFileProvider, one.microstream.persistence.types.PersistenceTypeDictionaryExporter typeDictionaryExporter)
StorageConnectionissueFullBackup in interface StorageConnectiontargetFileProvider - file provider for backup filestypeDictionaryExporter - custom type dictionary exporterpublic StorageRawFileStatistics createStorageStatistics()
StorageConnectionStorageRawFileStatistics instance, (obviously) containing raw file statistics about
every channel in the storage.createStorageStatistics in interface StorageConnectionStorageRawFileStatistics instance based on the current state.public void exportChannels(StorageLiveFileProvider fileProvider, boolean performGarbageCollection)
StorageConnectionStorageLiveFileProvider instance.exportChannels in interface StorageConnectionfileProvider - the StorageLiveFileProvider logic to be used for the export.performGarbageCollection - whether a StorageConnection.issueFullGarbageCollection() shall be issued before
performing the export.public StorageEntityTypeExportStatistics exportTypes(StorageEntityTypeExportFileProvider exportFileProvider, Predicate<? super StorageEntityTypeHandler> isExportType)
StorageConnectionThis is useful to extract the data contained in the storage in a structured way, for example to migrate it into another storage system or to analyze it, like converting it into human readable form.
exportTypes in interface StorageConnectionexportFileProvider - the StorageEntityTypeExportFileProvider logic to be used.isExportType - a Predicate selecting which type's entity data to be exported.StorageEntityTypeExportStatistics information instance about the completed export.StorageConnection.exportTypes(StorageEntityTypeExportFileProvider)public void importFiles(one.microstream.collections.types.XGettingEnum<one.microstream.afs.types.AFile> importFiles)
StorageConnectionAFile in order.importFiles in interface StorageConnectionimportFiles - the files whose native binary content shall be imported.Copyright © 2022 MicroStream Software. All rights reserved.