Package one.microstream.storage.types
Class StorageChannel.Default
java.lang.Object
one.microstream.storage.types.StorageChannel.Default
- All Implemented Interfaces:
Runnable
,Unpersistable
,StorageActivePart
,StorageChannel
,StorageChannelResetablePart
,StorageHashChannelPart
- Enclosing interface:
- StorageChannel
public static final class StorageChannel.Default extends Object implements StorageChannel, Unpersistable
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageChannel
StorageChannel.Default, StorageChannel.EntityCollectorByOid, StorageChannel.EntityCollectorByTid, StorageChannel.HousekeepingTask
-
Constructor Summary
Constructors Constructor Description Default(int hashIndex, StorageExceptionHandler exceptionHandler, StorageTaskBroker taskBroker, StorageOperationController operationController, StorageHousekeepingController housekeepingController, StorageEntityCache.Default entityCache, boolean switchByteOrder, BufferSizeProviderIncremental loadingBufferSizeProvider, StorageFileManager.Default fileManager, StorageEventLogger eventLogger)
-
Method Summary
-
Constructor Details
-
Default
public Default(int hashIndex, StorageExceptionHandler exceptionHandler, StorageTaskBroker taskBroker, StorageOperationController operationController, StorageHousekeepingController housekeepingController, StorageEntityCache.Default entityCache, boolean switchByteOrder, BufferSizeProviderIncremental loadingBufferSizeProvider, StorageFileManager.Default fileManager, StorageEventLogger eventLogger)
-
-
Method Details
-
isActive
public boolean isActive()Description copied from interface:StorageActivePart
Queries whether the part is actually active right now. This might returntrue
even despite some "running" flag being set tofalse
because there might be one last loop cycle execution before checking the "running" flag again.- Specified by:
isActive
in interfaceStorageActivePart
- Returns:
- if the part is actually active right now.
-
run
public final void run() -
commitChunkStorage
public void commitChunkStorage()- Specified by:
commitChunkStorage
in interfaceStorageChannel
-
storeEntities
- Specified by:
storeEntities
in interfaceStorageChannel
-
postStoreUpdateEntityCache
public void postStoreUpdateEntityCache(ByteBuffer[] chunks, long[] chunksStoragePositions) throws InterruptedException- Specified by:
postStoreUpdateEntityCache
in interfaceStorageChannel
- Throws:
InterruptedException
-
channelIndex
public final int channelIndex()- Specified by:
channelIndex
in interfaceStorageHashChannelPart
-
typeDictionary
- Specified by:
typeDictionary
in interfaceStorageChannel
-
collectLoadByOids
- Specified by:
collectLoadByOids
in interfaceStorageChannel
-
collectLoadRoots
- Specified by:
collectLoadRoots
in interfaceStorageChannel
-
collectLoadByTids
- Specified by:
collectLoadByTids
in interfaceStorageChannel
-
issuedGarbageCollection
public final boolean issuedGarbageCollection(long nanoTimeBudget)- Specified by:
issuedGarbageCollection
in interfaceStorageChannel
-
issuedFileCheck
public boolean issuedFileCheck(long nanoTimeBudget)- Specified by:
issuedFileCheck
in interfaceStorageChannel
-
issuedCacheCheck
- Specified by:
issuedCacheCheck
in interfaceStorageChannel
-
exportData
- Specified by:
exportData
in interfaceStorageChannel
-
prepareImportData
- Specified by:
prepareImportData
in interfaceStorageChannel
-
importData
- Specified by:
importData
in interfaceStorageChannel
-
rollbackImportData
- Specified by:
rollbackImportData
in interfaceStorageChannel
-
commitImportData
public void commitImportData(long taskTimestamp)- Specified by:
commitImportData
in interfaceStorageChannel
-
exportTypeEntities
public final KeyValue<Long,Long> exportTypeEntities(StorageEntityTypeHandler type, StorageLockedFile file, Predicate<? super StorageEntity> predicateEntity) throws IOException- Specified by:
exportTypeEntities
in interfaceStorageChannel
- Throws:
IOException
-
exportTypeEntities
public final KeyValue<Long,Long> exportTypeEntities(StorageEntityTypeHandler type, StorageLockedFile file) throws IOException- Specified by:
exportTypeEntities
in interfaceStorageChannel
- Throws:
IOException
-
createRawFileStatistics
- Specified by:
createRawFileStatistics
in interfaceStorageChannel
-
rollbackChunkStorage
public final void rollbackChunkStorage()- Specified by:
rollbackChunkStorage
in interfaceStorageChannel
-
readStorage
- Specified by:
readStorage
in interfaceStorageChannel
-
initializeStorage
public final StorageIdAnalysis initializeStorage(long taskTimestamp, long consistentStoreTimestamp, StorageInventory storageInventory)- Specified by:
initializeStorage
in interfaceStorageChannel
-
reset
public final void reset()Closes all resources (files, locks, etc.). Clears all variable length items (cache, registry, etc.). Resets internal state to initial values. For itself and all its parts (entity cache, file manager, etc.). Basically a "back to just being born" action.- Specified by:
reset
in interfaceStorageChannelResetablePart
-
signalGarbageCollectionSweepCompleted
public final void signalGarbageCollectionSweepCompleted()- Specified by:
signalGarbageCollectionSweepCompleted
in interfaceStorageChannel
-
cleanupStore
public void cleanupStore()- Specified by:
cleanupStore
in interfaceStorageChannel
-