Package one.microstream.storage.types
Class StorageFileManager.Default
java.lang.Object
one.microstream.storage.types.StorageFileManager.Default
- All Implemented Interfaces:
StorageChannelResetablePart
,StorageFileManager
,StorageFileUser
,StorageHashChannelPart
,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, StorageChannel parent)
boolean
issuedFileCleanupCheck(long nanoTimeBudget)
void
iterateStorageFiles(Consumer<? super StorageDataFile<?>> procedure)
StorageInventory
readStorage()
void
reset()
Closes all resources (files, locks, etc.).void
restartFileCleanupCursor()
void
rollbackWrite()
long[]
storeChunks(long timestamp, ByteBuffer[] dataBuffers)
void
validateIncrementalRead(StorageLockedFile fileChannel, long filePosition, ByteBuffer buffer, long lastReadCount)
-
Constructor Details
-
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 Details
-
channelIndex
public final int channelIndex()- Specified by:
channelIndex
in interfaceStorageFileManager
- Specified by:
channelIndex
in interfaceStorageHashChannelPart
-
currentStorageFile
- Specified by:
currentStorageFile
in interfaceStorageFileManager
-
iterateStorageFiles
- 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
- Specified by:
readStorage
in interfaceStorageFileManager
-
initializeStorage
public StorageIdAnalysis initializeStorage(long taskTimestamp, long consistentStoreTimestamp, StorageInventory storageInventory, StorageChannel parent)- Specified by:
initializeStorage
in interfaceStorageFileManager
-
reset
public final void reset()Description copied from interface:StorageChannelResetablePart
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
- Specified by:
reset
in interfaceStorageFileManager
-
exportData
- Specified by:
exportData
in interfaceStorageFileManager
-
createRawFileStatistics
- Specified by:
createRawFileStatistics
in interfaceStorageFileManager
-
incrementalFileCleanupCheck
public final boolean incrementalFileCleanupCheck(long nanoTimeBudgetBound)- Specified by:
incrementalFileCleanupCheck
in interfaceStorageFileManager
-
restartFileCleanupCursor
public final void restartFileCleanupCursor()- Specified by:
restartFileCleanupCursor
in interfaceStorageFileManager
-
issuedFileCleanupCheck
public final boolean issuedFileCleanupCheck(long nanoTimeBudget)- Specified by:
issuedFileCleanupCheck
in interfaceStorageFileManager
-
copyData
-
commitImport
public void commitImport(long taskTimestamp)
-