Package one.microstream.storage.types
Interface StorageConnection
-
- All Superinterfaces:
PersistenceStoring
- All Known Subinterfaces:
EmbeddedStorageManager
- All Known Implementing Classes:
EmbeddedStorageManager.Default,StorageConnection.Default
public interface StorageConnection extends PersistenceStoring
Ultra-thin delegatig type that connects aPersistenceManagerinstance (potentially exclusively created) to a storage instance.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classStorageConnection.Default
-
Method Summary
Modifier and Type Method Description default StorercreateEagerStorer()default StorercreateLazyStorer()StorageRawFileStatisticscreateStorageStatistics()default StorercreateStorer()default voidexportChannels(StorageIoHandler fileHandler)voidexportChannels(StorageIoHandler fileHandler, boolean performGarbageCollection)default StorageEntityTypeExportStatisticsexportTypes(StorageEntityTypeExportFileProvider exportFileProvider)StorageEntityTypeExportStatisticsexportTypes(StorageEntityTypeExportFileProvider exportFileProvider, Predicate<? super StorageEntityTypeHandler> isExportType)voidimportFiles(XGettingEnum<File> importFiles)default booleanissueCacheCheck(long nanoTimeBudgetBound)booleanissueCacheCheck(long nanoTimeBudgetBound, StorageEntityCacheEvaluator entityEvaluator)default booleanissueFileCheck(long nanoTimeBudgetBound)booleanissueFileCheck(long nanoTimeBudgetBound, StorageDataFileDissolvingEvaluator fileDissolvingEvaluator)default voidissueFullCacheCheck()default voidissueFullCacheCheck(StorageEntityCacheEvaluator entityEvaluator)default voidissueFullFileCheck()default voidissueFullFileCheck(StorageDataFileDissolvingEvaluator fileDissolvingEvaluator)default voidissueFullGarbageCollection()Issues a full garbage collection to be executed.booleanissueGarbageCollection(long nanoTimeBudget)PersistenceManager<Binary>persistenceManager()default longstore(Object instance)Stores the passed instance in any case and all referenced instances of persistable references recursively, but stores referenced instances only if they are newly encountered (e.g.default voidstoreAll(Iterable<?> instances)Convenience method toPersistenceStoring.store(Object)all instances of anIterabletype, usually a collection.
The passed instance itself is NOT stored.
Note that this method does not return an array of objectIds, since the amount of instances supplied by the passedIterablecannot be known until after all instances have been stored and the memory and performance overhead to collect them dynamically would not be worth it in most cases since the returned array is hardly ever needed.default long[]storeAll(Object... instances)Convenience method toPersistenceStoring.store(Object)multiple instances.default voidstoreSelfStoring(SelfStoring storing)
-
-
-
Method Detail
-
issueFullGarbageCollection
default void issueFullGarbageCollection()
Issues a full garbage collection to be executed. Depending on the size of the database, the available cache, used hardware, etc., this can take any amount of time.
-
issueGarbageCollection
boolean issueGarbageCollection(long nanoTimeBudget)
-
issueFullFileCheck
default void issueFullFileCheck()
-
issueFullFileCheck
default void issueFullFileCheck(StorageDataFileDissolvingEvaluator fileDissolvingEvaluator)
-
issueFileCheck
default boolean issueFileCheck(long nanoTimeBudgetBound)
-
issueFileCheck
boolean issueFileCheck(long nanoTimeBudgetBound, StorageDataFileDissolvingEvaluator fileDissolvingEvaluator)
-
issueFullCacheCheck
default void issueFullCacheCheck()
-
issueFullCacheCheck
default void issueFullCacheCheck(StorageEntityCacheEvaluator entityEvaluator)
-
issueCacheCheck
default boolean issueCacheCheck(long nanoTimeBudgetBound)
-
issueCacheCheck
boolean issueCacheCheck(long nanoTimeBudgetBound, StorageEntityCacheEvaluator entityEvaluator)
-
createStorageStatistics
StorageRawFileStatistics createStorageStatistics()
-
exportChannels
void exportChannels(StorageIoHandler fileHandler, boolean performGarbageCollection)
-
exportChannels
default void exportChannels(StorageIoHandler fileHandler)
-
exportTypes
default StorageEntityTypeExportStatistics exportTypes(StorageEntityTypeExportFileProvider exportFileProvider)
-
exportTypes
StorageEntityTypeExportStatistics exportTypes(StorageEntityTypeExportFileProvider exportFileProvider, Predicate<? super StorageEntityTypeHandler> isExportType)
-
importFiles
void importFiles(XGettingEnum<File> importFiles)
-
persistenceManager
PersistenceManager<Binary> persistenceManager()
-
store
default long store(Object instance)
Description copied from interface:PersistenceStoringStores the passed instance in any case and all referenced instances of persistable references recursively, but stores referenced instances only if they are newly encountered (e.g. don't have an id associated with them in the object registry, yet and are therefore required to be handled). This is useful for the common case of just storing an updated instance and potentially newly created instances along with it while skipping all existing (and normally unchanged) referenced instances.- Specified by:
storein interfacePersistenceStoring- Parameters:
instance- the root instance of the subgraph of required instances to be stored.- Returns:
- the object id representing the passed instance.
-
storeAll
default long[] storeAll(Object... instances)
Description copied from interface:PersistenceStoringConvenience method toPersistenceStoring.store(Object)multiple instances. The passed array (maybe implicitely created by the compiler) itself is NOT stored.- Specified by:
storeAllin interfacePersistenceStoring- Parameters:
instances- multiple root instances of the subgraphs of required instances to be stored.- Returns:
- an array containing the object ids representing the passed instances.
-
storeAll
default void storeAll(Iterable<?> instances)
Description copied from interface:PersistenceStoringConvenience method toPersistenceStoring.store(Object)all instances of anIterabletype, usually a collection.
The passed instance itself is NOT stored.
Note that this method does not return an array of objectIds, since the amount of instances supplied by the passedIterablecannot be known until after all instances have been stored and the memory and performance overhead to collect them dynamically would not be worth it in most cases since the returned array is hardly ever needed. If it should be needed, the desired behavior can be easily achieved with a tiny custom-made utility method.- Specified by:
storeAllin interfacePersistenceStoring- Parameters:
instances- multiple root instances of the subgraphs of required instances to be stored.
-
storeSelfStoring
default void storeSelfStoring(SelfStoring storing)
- Specified by:
storeSelfStoringin interfacePersistenceStoring
-
createLazyStorer
default Storer createLazyStorer()
-
createStorer
default Storer createStorer()
-
createEagerStorer
default Storer createEagerStorer()
-
-