Package one.microstream.storage.types
Class StorageFileManager.Default
- java.lang.Object
-
- one.microstream.storage.types.StorageFileManager.Default
-
- All Implemented Interfaces:
StorageChannelResetablePart,StorageFileManager,StorageFileUser,StorageHashChannelPart,one.microstream.typing.Disposable
- 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, one.microstream.util.BufferSizeProvider standardBufferSizeProvider, StorageBackupHandler backupHandler)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intchannelIndex()voidcommitImport(long taskTimestamp)voidcommitWrite()voidcopyData(StorageImportSource importSource)StorageRawFileStatistics.ChannelStatisticscreateRawFileStatistics()StorageLiveDataFile.DefaultcurrentStorageFile()voiddeleteBuffers()The deleteBuffers method is used to allow an early deallocation of the used DirectByteBuffers in order to reduce the off-heap memory footprint without the need to relay on the GC.protected StorageInventorydetermineEffectiveStorageInventory(StorageInventory storageInventory, one.microstream.collections.EqHashTable<Long,StorageDataInventoryFile> supplementedMissingEmptyFiles)voiddispose()voidexportData(StorageLiveFileProvider fileProvider)booleanincrementalFileCleanupCheck(long nanoTimeBudgetBound)StorageIdAnalysisinitializeStorage(long taskTimestamp, long consistentStoreTimestamp, StorageInventory storageInventory, StorageChannel parent)booleanissuedFileCleanupCheck(long nanoTimeBudgetBound)voiditerateStorageFiles(Consumer<? super StorageLiveDataFile> procedure)StorageInventoryreadStorage()voidreset()Closes all resources (files, locks, etc.).voidrestartFileCleanupCursor()voidrollbackWrite()long[]storeChunks(long timestamp, ByteBuffer[] dataBuffers)protected voidsupplementedMissingEmptyFile(one.microstream.collections.EqHashTable<Long,StorageDataInventoryFile> supplementedMissingEmptyFiles, long fileNumber)
-
-
-
Constructor Detail
-
Default
public Default(int channelIndex, StorageInitialDataFileNumberProvider initialDataFileNumberProvider, StorageTimestampProvider timestampProvider, StorageLiveFileProvider fileProvider, StorageDataFileEvaluator dataFileEvaluator, StorageEntityCache.Default entityCache, StorageWriteController writeController, StorageFileWriter writer, one.microstream.util.BufferSizeProvider standardBufferSizeProvider, StorageBackupHandler backupHandler)
-
-
Method Detail
-
dispose
public final void dispose()
- Specified by:
disposein interfaceone.microstream.typing.Disposable
-
channelIndex
public final int channelIndex()
- Specified by:
channelIndexin interfaceStorageFileManager- Specified by:
channelIndexin interfaceStorageHashChannelPart
-
currentStorageFile
public final StorageLiveDataFile.Default currentStorageFile()
- Specified by:
currentStorageFilein interfaceStorageFileManager
-
iterateStorageFiles
public void iterateStorageFiles(Consumer<? super StorageLiveDataFile> procedure)
- Specified by:
iterateStorageFilesin interfaceStorageFileManager
-
storeChunks
public final long[] storeChunks(long timestamp, ByteBuffer[] dataBuffers) throws StorageExceptionIoWritingChunk- Specified by:
storeChunksin interfaceStorageFileManager- Throws:
StorageExceptionIoWritingChunk
-
rollbackWrite
public final void rollbackWrite()
- Specified by:
rollbackWritein interfaceStorageFileManager
-
commitWrite
public final void commitWrite()
- Specified by:
commitWritein interfaceStorageFileManager
-
readStorage
public final StorageInventory readStorage()
- Specified by:
readStoragein interfaceStorageFileManager
-
supplementedMissingEmptyFile
protected void supplementedMissingEmptyFile(one.microstream.collections.EqHashTable<Long,StorageDataInventoryFile> supplementedMissingEmptyFiles, long fileNumber)
-
initializeStorage
public StorageIdAnalysis initializeStorage(long taskTimestamp, long consistentStoreTimestamp, StorageInventory storageInventory, StorageChannel parent)
- Specified by:
initializeStoragein interfaceStorageFileManager
-
determineEffectiveStorageInventory
protected StorageInventory determineEffectiveStorageInventory(StorageInventory storageInventory, one.microstream.collections.EqHashTable<Long,StorageDataInventoryFile> supplementedMissingEmptyFiles)
-
reset
public final void reset()
Description copied from interface:StorageChannelResetablePartCloses 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:
resetin interfaceStorageChannelResetablePart- Specified by:
resetin interfaceStorageFileManager
-
deleteBuffers
public final void deleteBuffers()
The deleteBuffers method is used to allow an early deallocation of the used DirectByteBuffers in order to reduce the off-heap memory footprint without the need to relay on the GC. after calling this method the StorageManager is left in a inoperable state.
-
exportData
public void exportData(StorageLiveFileProvider fileProvider)
- Specified by:
exportDatain interfaceStorageFileManager
-
createRawFileStatistics
public final StorageRawFileStatistics.ChannelStatistics createRawFileStatistics()
- Specified by:
createRawFileStatisticsin interfaceStorageFileManager
-
incrementalFileCleanupCheck
public final boolean incrementalFileCleanupCheck(long nanoTimeBudgetBound)
- Specified by:
incrementalFileCleanupCheckin interfaceStorageFileManager
-
restartFileCleanupCursor
public final void restartFileCleanupCursor()
- Specified by:
restartFileCleanupCursorin interfaceStorageFileManager
-
issuedFileCleanupCheck
public final boolean issuedFileCleanupCheck(long nanoTimeBudgetBound)
- Specified by:
issuedFileCleanupCheckin interfaceStorageFileManager
-
copyData
public void copyData(StorageImportSource importSource)
-
commitImport
public void commitImport(long taskTimestamp)
-
-