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:StorageActivePartQueries whether the part is actually active right now. This might returntrueeven despite some "running" flag being set tofalsebecause there might be one last loop cycle execution before checking the "running" flag again.- Specified by:
isActivein interfaceStorageActivePart- Returns:
- if the part is actually active right now.
-
run
public final void run() -
commitChunkStorage
public void commitChunkStorage()- Specified by:
commitChunkStoragein interfaceStorageChannel
-
storeEntities
- Specified by:
storeEntitiesin interfaceStorageChannel
-
postStoreUpdateEntityCache
public void postStoreUpdateEntityCache(ByteBuffer[] chunks, long[] chunksStoragePositions) throws InterruptedException- Specified by:
postStoreUpdateEntityCachein interfaceStorageChannel- Throws:
InterruptedException
-
channelIndex
public final int channelIndex()- Specified by:
channelIndexin interfaceStorageHashChannelPart
-
typeDictionary
- Specified by:
typeDictionaryin interfaceStorageChannel
-
collectLoadByOids
- Specified by:
collectLoadByOidsin interfaceStorageChannel
-
collectLoadRoots
- Specified by:
collectLoadRootsin interfaceStorageChannel
-
collectLoadByTids
- Specified by:
collectLoadByTidsin interfaceStorageChannel
-
issuedGarbageCollection
public final boolean issuedGarbageCollection(long nanoTimeBudget)- Specified by:
issuedGarbageCollectionin interfaceStorageChannel
-
issuedFileCheck
public boolean issuedFileCheck(long nanoTimeBudget)- Specified by:
issuedFileCheckin interfaceStorageChannel
-
issuedCacheCheck
- Specified by:
issuedCacheCheckin interfaceStorageChannel
-
exportData
- Specified by:
exportDatain interfaceStorageChannel
-
prepareImportData
- Specified by:
prepareImportDatain interfaceStorageChannel
-
importData
- Specified by:
importDatain interfaceStorageChannel
-
rollbackImportData
- Specified by:
rollbackImportDatain interfaceStorageChannel
-
commitImportData
public void commitImportData(long taskTimestamp)- Specified by:
commitImportDatain interfaceStorageChannel
-
exportTypeEntities
public final KeyValue<Long,Long> exportTypeEntities(StorageEntityTypeHandler type, StorageLockedFile file, Predicate<? super StorageEntity> predicateEntity) throws IOException- Specified by:
exportTypeEntitiesin interfaceStorageChannel- Throws:
IOException
-
exportTypeEntities
public final KeyValue<Long,Long> exportTypeEntities(StorageEntityTypeHandler type, StorageLockedFile file) throws IOException- Specified by:
exportTypeEntitiesin interfaceStorageChannel- Throws:
IOException
-
createRawFileStatistics
- Specified by:
createRawFileStatisticsin interfaceStorageChannel
-
rollbackChunkStorage
public final void rollbackChunkStorage()- Specified by:
rollbackChunkStoragein interfaceStorageChannel
-
readStorage
- Specified by:
readStoragein interfaceStorageChannel
-
initializeStorage
public final StorageIdAnalysis initializeStorage(long taskTimestamp, long consistentStoreTimestamp, StorageInventory storageInventory)- Specified by:
initializeStoragein 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:
resetin interfaceStorageChannelResetablePart
-
signalGarbageCollectionSweepCompleted
public final void signalGarbageCollectionSweepCompleted()- Specified by:
signalGarbageCollectionSweepCompletedin interfaceStorageChannel
-
cleanupStore
public void cleanupStore()- Specified by:
cleanupStorein interfaceStorageChannel
-