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: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.
-
commitChunkStorage
public void commitChunkStorage()
- Specified by:
commitChunkStoragein interfaceStorageChannel
-
storeEntities
public KeyValue<ByteBuffer[],long[]> storeEntities(long timestamp, Chunk chunkData)
- 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
public final StorageTypeDictionary typeDictionary()
- Specified by:
typeDictionaryin interfaceStorageChannel
-
collectLoadByOids
public final ChunksBuffer collectLoadByOids(ChunksBuffer[] resultArray, PersistenceIdSet loadOids)
- Specified by:
collectLoadByOidsin interfaceStorageChannel
-
collectLoadRoots
public final ChunksBuffer collectLoadRoots(ChunksBuffer[] resultArray)
- Specified by:
collectLoadRootsin interfaceStorageChannel
-
collectLoadByTids
public final ChunksBuffer collectLoadByTids(ChunksBuffer[] resultArray, PersistenceIdSet loadTids)
- Specified by:
collectLoadByTidsin interfaceStorageChannel
-
issuedGarbageCollection
public final boolean issuedGarbageCollection(long nanoTimeBudgetBound)
- Specified by:
issuedGarbageCollectionin interfaceStorageChannel
-
issuedFileCheck
public boolean issuedFileCheck(long nanoTimeBudgetBound, StorageDataFileDissolvingEvaluator fileDissolver)- Specified by:
issuedFileCheckin interfaceStorageChannel
-
issuedCacheCheck
public boolean issuedCacheCheck(long nanoTimeBudgetBound, StorageEntityCacheEvaluator entityEvaluator)- Specified by:
issuedCacheCheckin interfaceStorageChannel
-
exportData
public final void exportData(StorageIoHandler fileHandler)
- Specified by:
exportDatain interfaceStorageChannel
-
prepareImportData
public StorageEntityCache.Default prepareImportData()
- Specified by:
prepareImportDatain interfaceStorageChannel
-
importData
public void importData(StorageChannelImportSourceFile importFile)
- Specified by:
importDatain interfaceStorageChannel
-
rollbackImportData
public void rollbackImportData(Throwable cause)
- 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
public final StorageRawFileStatistics.ChannelStatistics createRawFileStatistics()
- Specified by:
createRawFileStatisticsin interfaceStorageChannel
-
rollbackChunkStorage
public final void rollbackChunkStorage()
- Specified by:
rollbackChunkStoragein interfaceStorageChannel
-
readStorage
public final StorageInventory readStorage()
- Specified by:
readStoragein interfaceStorageChannel
-
initializeStorage
public final StorageIdAnalysis initializeStorage(long taskTimestamp, long consistentStoreTimestamp, StorageInventory storageInventory)
- Specified by:
initializeStoragein interfaceStorageChannel
-
clear
public final void clear()
- Specified by:
clearin interfaceStorageChannel
-
signalGarbageCollectionSweepCompleted
public final void signalGarbageCollectionSweepCompleted()
- Specified by:
signalGarbageCollectionSweepCompletedin interfaceStorageChannel
-
cleanupStore
public void cleanupStore()
- Specified by:
cleanupStorein interfaceStorageChannel
-
-