Package one.microstream.storage.types
Class StorageFileManager.Default
java.lang.Object
one.microstream.storage.types.StorageFileManager.Default
- All Implemented Interfaces:
StorageChannelResetablePart
,StorageFileManager
,StorageFileUser
,StorageHashChannelPart
- Enclosing interface:
- StorageFileManager
public static final class StorageFileManager.Default extends Object implements StorageFileManager, StorageFileUser
-
Nested Class Summary
Nested classes/interfaces inherited from interface one.microstream.storage.types.StorageFileManager
StorageFileManager.Default
-
Constructor Summary
Constructors Constructor Description Default(int channelIndex, StorageInitialDataFileNumberProvider initialDataFileNumberProvider, StorageTimestampProvider timestampProvider, StorageLiveFileProvider fileProvider, StorageDataFileEvaluator dataFileEvaluator, StorageEntityCache.Default entityCache, StorageWriteController writeController, StorageFileWriter writer, BufferSizeProvider standardBufferSizeProvider, StorageBackupHandler backupHandler)
-
Method Summary
Modifier and Type Method Description int
channelIndex()
void
commitImport(long taskTimestamp)
void
commitWrite()
void
copyData(StorageImportSourceFile importFile)
StorageRawFileStatistics.ChannelStatistics
createRawFileStatistics()
StorageLiveDataFile.Default
currentStorageFile()
void
exportData(StorageLiveFileProvider fileProvider)
boolean
incrementalFileCleanupCheck(long nanoTimeBudgetBound)
StorageIdAnalysis
initializeStorage(long taskTimestamp, long consistentStoreTimestamp, StorageInventory storageInventory, StorageChannel parent)
boolean
issuedFileCleanupCheck(long nanoTimeBudgetBound)
void
iterateStorageFiles(Consumer<? super StorageLiveDataFile> procedure)
StorageInventory
readStorage()
void
reset()
Closes all resources (files, locks, etc.).void
restartFileCleanupCursor()
void
rollbackWrite()
long[]
storeChunks(long timestamp, ByteBuffer[] dataBuffers)
-
Constructor Details
-
Default
public Default(int channelIndex, StorageInitialDataFileNumberProvider initialDataFileNumberProvider, StorageTimestampProvider timestampProvider, StorageLiveFileProvider fileProvider, StorageDataFileEvaluator dataFileEvaluator, StorageEntityCache.Default entityCache, StorageWriteController writeController, 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
-
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 nanoTimeBudgetBound)- Specified by:
issuedFileCleanupCheck
in interfaceStorageFileManager
-
copyData
-
commitImport
public void commitImport(long taskTimestamp)
-