Package one.microstream.storage.types
Class StorageFileManager.Default
- java.lang.Object
-
- one.microstream.storage.types.StorageFileManager.Default
-
- All Implemented Interfaces:
StorageFileManager
,StorageFileUser
,StorageReaderCallback
- Enclosing interface:
- StorageFileManager
public static final class StorageFileManager.Default extends Object implements StorageFileManager, StorageReaderCallback, StorageFileUser
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageFileManager
StorageFileManager.Default
-
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageReaderCallback
StorageReaderCallback.Default
-
-
Constructor Summary
Constructors Constructor Description Default(int channelIndex, StorageInitialDataFileNumberProvider initialDataFileNumberProvider, StorageTimestampProvider timestampProvider, StorageFileProvider storageFileProvider, StorageDataFileEvaluator dataFileEvaluator, StorageEntityCache.Default entityCache, StorageFileReader reader, StorageFileWriter writer, BufferSizeProvider standardBufferSizeProvider, StorageBackupHandler backupHandler)
-
Method Summary
Modifier and Type Method Description int
channelIndex()
void
commitImport(long taskTimestamp)
void
commitWrite()
void
copyData(StorageChannelImportSourceFile importFile)
StorageRawFileStatistics.ChannelStatistics
createRawFileStatistics()
StorageDataFile.Default
currentStorageFile()
void
exportData(StorageIoHandler fileHandler)
boolean
incrementalFileCleanupCheck(long nanoTimeBudgetBound)
StorageIdAnalysis
initializeStorage(long taskTimestamp, long consistentStoreTimestamp, StorageInventory storageInventory)
boolean
issuedFileCleanupCheck(long nanoTimeBudgetBound, StorageDataFileDissolvingEvaluator fileDissolver)
void
iterateStorageFiles(Consumer<? super StorageDataFile<?>> procedure)
StorageInventory
readStorage()
void
resetFileCleanupCursor()
void
rollbackWrite()
long[]
storeChunks(long timestamp, ByteBuffer[] dataBuffers)
void
validateIncrementalRead(StorageLockedFile fileChannel, long filePosition, ByteBuffer buffer, long lastReadCount)
-
-
-
Constructor Detail
-
Default
public Default(int channelIndex, StorageInitialDataFileNumberProvider initialDataFileNumberProvider, StorageTimestampProvider timestampProvider, StorageFileProvider storageFileProvider, StorageDataFileEvaluator dataFileEvaluator, StorageEntityCache.Default entityCache, StorageFileReader reader, StorageFileWriter writer, BufferSizeProvider standardBufferSizeProvider, StorageBackupHandler backupHandler)
-
-
Method Detail
-
channelIndex
public final int channelIndex()
- Specified by:
channelIndex
in interfaceStorageFileManager
-
currentStorageFile
public final StorageDataFile.Default currentStorageFile()
- Specified by:
currentStorageFile
in interfaceStorageFileManager
-
iterateStorageFiles
public void iterateStorageFiles(Consumer<? super StorageDataFile<?>> procedure)
- Specified by:
iterateStorageFiles
in interfaceStorageFileManager
-
storeChunks
public final long[] storeChunks(long timestamp, ByteBuffer[] dataBuffers) throws StorageExceptionIoWritingChunk
- Specified by:
storeChunks
in interfaceStorageFileManager
- Throws:
StorageExceptionIoWritingChunk
-
rollbackWrite
public final void rollbackWrite()
- Specified by:
rollbackWrite
in interfaceStorageFileManager
-
commitWrite
public final void commitWrite()
- Specified by:
commitWrite
in interfaceStorageFileManager
-
validateIncrementalRead
public void validateIncrementalRead(StorageLockedFile fileChannel, long filePosition, ByteBuffer buffer, long lastReadCount) throws IOException
- Specified by:
validateIncrementalRead
in interfaceStorageReaderCallback
- Throws:
IOException
-
readStorage
public final StorageInventory readStorage()
- Specified by:
readStorage
in interfaceStorageFileManager
-
initializeStorage
public StorageIdAnalysis initializeStorage(long taskTimestamp, long consistentStoreTimestamp, StorageInventory storageInventory)
- Specified by:
initializeStorage
in interfaceStorageFileManager
-
exportData
public void exportData(StorageIoHandler fileHandler)
- Specified by:
exportData
in interfaceStorageFileManager
-
createRawFileStatistics
public final StorageRawFileStatistics.ChannelStatistics createRawFileStatistics()
- Specified by:
createRawFileStatistics
in interfaceStorageFileManager
-
incrementalFileCleanupCheck
public final boolean incrementalFileCleanupCheck(long nanoTimeBudgetBound)
- Specified by:
incrementalFileCleanupCheck
in interfaceStorageFileManager
-
resetFileCleanupCursor
public final void resetFileCleanupCursor()
- Specified by:
resetFileCleanupCursor
in interfaceStorageFileManager
-
issuedFileCleanupCheck
public final boolean issuedFileCleanupCheck(long nanoTimeBudgetBound, StorageDataFileDissolvingEvaluator fileDissolver)
- Specified by:
issuedFileCleanupCheck
in interfaceStorageFileManager
-
copyData
public void copyData(StorageChannelImportSourceFile importFile)
-
commitImport
public void commitImport(long taskTimestamp)
-
-