Package one.microstream.storage.types
Class StorageChannel.Default
- java.lang.Object
-
- one.microstream.storage.types.StorageChannel.Default
-
- All Implemented Interfaces:
Runnable
,Unpersistable
,StorageActivePart
,StorageChannel
,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 Detail
-
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 Detail
-
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.
-
commitChunkStorage
public void commitChunkStorage()
- Specified by:
commitChunkStorage
in interfaceStorageChannel
-
storeEntities
public KeyValue<ByteBuffer[],long[]> storeEntities(long timestamp, Chunk chunkData)
- 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
public final StorageTypeDictionary typeDictionary()
- Specified by:
typeDictionary
in interfaceStorageChannel
-
collectLoadByOids
public final ChunksBuffer collectLoadByOids(ChunksBuffer[] resultArray, PersistenceIdSet loadOids)
- Specified by:
collectLoadByOids
in interfaceStorageChannel
-
collectLoadRoots
public final ChunksBuffer collectLoadRoots(ChunksBuffer[] resultArray)
- Specified by:
collectLoadRoots
in interfaceStorageChannel
-
collectLoadByTids
public final ChunksBuffer collectLoadByTids(ChunksBuffer[] resultArray, PersistenceIdSet loadTids)
- Specified by:
collectLoadByTids
in interfaceStorageChannel
-
issuedGarbageCollection
public final boolean issuedGarbageCollection(long nanoTimeBudgetBound)
- Specified by:
issuedGarbageCollection
in interfaceStorageChannel
-
issuedFileCheck
public boolean issuedFileCheck(long nanoTimeBudgetBound, StorageDataFileDissolvingEvaluator fileDissolver)
- Specified by:
issuedFileCheck
in interfaceStorageChannel
-
issuedCacheCheck
public boolean issuedCacheCheck(long nanoTimeBudgetBound, StorageEntityCacheEvaluator entityEvaluator)
- Specified by:
issuedCacheCheck
in interfaceStorageChannel
-
exportData
public final void exportData(StorageIoHandler fileHandler)
- Specified by:
exportData
in interfaceStorageChannel
-
prepareImportData
public StorageEntityCache.Default prepareImportData()
- Specified by:
prepareImportData
in interfaceStorageChannel
-
importData
public void importData(StorageChannelImportSourceFile importFile)
- Specified by:
importData
in interfaceStorageChannel
-
rollbackImportData
public void rollbackImportData(Throwable cause)
- 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
public final StorageRawFileStatistics.ChannelStatistics createRawFileStatistics()
- Specified by:
createRawFileStatistics
in interfaceStorageChannel
-
rollbackChunkStorage
public final void rollbackChunkStorage()
- Specified by:
rollbackChunkStorage
in interfaceStorageChannel
-
readStorage
public final StorageInventory readStorage()
- Specified by:
readStorage
in interfaceStorageChannel
-
initializeStorage
public final StorageIdAnalysis initializeStorage(long taskTimestamp, long consistentStoreTimestamp, StorageInventory storageInventory)
- Specified by:
initializeStorage
in interfaceStorageChannel
-
clear
public final void clear()
- Specified by:
clear
in interfaceStorageChannel
-
signalGarbageCollectionSweepCompleted
public final void signalGarbageCollectionSweepCompleted()
- Specified by:
signalGarbageCollectionSweepCompleted
in interfaceStorageChannel
-
cleanupStore
public void cleanupStore()
- Specified by:
cleanupStore
in interfaceStorageChannel
-
-