Package one.microstream.storage.types
Interface StorageFileWriter
-
- All Known Subinterfaces:
StorageFileWriterBackupping
,StorageIoHandler
- All Known Implementing Classes:
StorageFileWriter.Default
,StorageFileWriterBackupping.Default
,StorageIoHandler.Default
public interface StorageFileWriter
Function type that encapsulates handling of all writing accesses to persistent data, including copying, truncation, deletion.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
StorageFileWriter.Default
static interface
StorageFileWriter.Provider
-
Method Summary
Modifier and Type Method Description default long
copy(StorageLockedFile sourceFile, StorageLockedFile targetfile)
default long
copyFilePart(StorageLockedFile sourceFile, long sourceOffset, long length, StorageLockedFile targetfile)
static void
craeteFileFullCopy(StorageNumberedFile sourceFile, StorageNumberedFile targetFile)
default void
delete(StorageInventoryFile file, StorageFileProvider storageFileProvider)
static void
deleteFile(StorageNumberedFile file, StorageFileProvider storageFileProvider)
default void
flush(StorageLockedFile targetfile)
static boolean
rescueFromDeletion(StorageNumberedFile file, StorageFileProvider storageFileProvider)
default void
truncate(StorageInventoryFile file, long newLength, StorageFileProvider storageFileProvider)
static void
truncateFile(StorageNumberedFile file, long newLength, StorageFileProvider storageFileProvider)
static long
validateIoByteCount(long specifiedByteCount, long actualByteCount)
default long
write(StorageLockedFile file, ByteBuffer[] byteBuffers)
default long
writeImport(StorageLockedFile sourceFile, long sourceOffset, long copyLength, StorageDataFile<?> targetFile)
Logically the same as a store, but technically the same as a transfer with an external source file.default long
writeStore(StorageDataFile<?> targetFile, ByteBuffer[] byteBuffers)
default long
writeTransactionEntryCreate(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageDataFile<?> dataFile)
default long
writeTransactionEntryDelete(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageDataFile<?> dataFile)
default long
writeTransactionEntryStore(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageDataFile<?> dataFile, long dataFileOffset, long storeLength)
default long
writeTransactionEntryTransfer(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageDataFile<?> dataFile, long dataFileOffset, long storeLength)
default long
writeTransactionEntryTruncate(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageInventoryFile file, long newFileLength)
default long
writeTransfer(StorageDataFile<?> sourceFile, long sourceOffset, long copyLength, StorageDataFile<?> targetFile)
-
-
-
Method Detail
-
validateIoByteCount
static long validateIoByteCount(long specifiedByteCount, long actualByteCount)
-
write
default long write(StorageLockedFile file, ByteBuffer[] byteBuffers)
-
copy
default long copy(StorageLockedFile sourceFile, StorageLockedFile targetfile)
-
copyFilePart
default long copyFilePart(StorageLockedFile sourceFile, long sourceOffset, long length, StorageLockedFile targetfile)
-
writeStore
default long writeStore(StorageDataFile<?> targetFile, ByteBuffer[] byteBuffers)
-
writeImport
default long writeImport(StorageLockedFile sourceFile, long sourceOffset, long copyLength, StorageDataFile<?> targetFile)
Logically the same as a store, but technically the same as a transfer with an external source file.
-
writeTransfer
default long writeTransfer(StorageDataFile<?> sourceFile, long sourceOffset, long copyLength, StorageDataFile<?> targetFile)
-
writeTransactionEntryCreate
default long writeTransactionEntryCreate(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageDataFile<?> dataFile)
-
writeTransactionEntryStore
default long writeTransactionEntryStore(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageDataFile<?> dataFile, long dataFileOffset, long storeLength)
-
writeTransactionEntryTransfer
default long writeTransactionEntryTransfer(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageDataFile<?> dataFile, long dataFileOffset, long storeLength)
-
writeTransactionEntryDelete
default long writeTransactionEntryDelete(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageDataFile<?> dataFile)
-
writeTransactionEntryTruncate
default long writeTransactionEntryTruncate(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageInventoryFile file, long newFileLength)
-
truncate
default void truncate(StorageInventoryFile file, long newLength, StorageFileProvider storageFileProvider)
-
truncateFile
static void truncateFile(StorageNumberedFile file, long newLength, StorageFileProvider storageFileProvider)
-
delete
default void delete(StorageInventoryFile file, StorageFileProvider storageFileProvider)
-
deleteFile
static void deleteFile(StorageNumberedFile file, StorageFileProvider storageFileProvider)
-
craeteFileFullCopy
static void craeteFileFullCopy(StorageNumberedFile sourceFile, StorageNumberedFile targetFile)
-
rescueFromDeletion
static boolean rescueFromDeletion(StorageNumberedFile file, StorageFileProvider storageFileProvider)
-
flush
default void flush(StorageLockedFile targetfile)
-
-