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 classStorageFileWriter.Defaultstatic interfaceStorageFileWriter.Provider -
Method Summary
Modifier and Type Method Description default longcopy(StorageLockedFile sourceFile, StorageLockedFile targetfile)default longcopyFilePart(StorageLockedFile sourceFile, long sourceOffset, long length, StorageLockedFile targetfile)static voidcreateFileFullCopy(StorageNumberedFile sourceFile, StorageNumberedFile targetFile)default voiddelete(StorageInventoryFile file, StorageFileProvider storageFileProvider)static voiddeleteFile(StorageNumberedFile file, StorageFileProvider storageFileProvider)default voidflush(StorageLockedFile targetfile)static booleanrescueFromDeletion(StorageNumberedFile file, StorageFileProvider storageFileProvider)default voidtruncate(StorageInventoryFile file, long newLength, StorageFileProvider storageFileProvider)static voidtruncateFile(StorageNumberedFile file, long newLength, StorageFileProvider storageFileProvider)static longvalidateIoByteCount(long specifiedByteCount, long actualByteCount)default longwrite(StorageLockedFile file, ByteBuffer[] byteBuffers)default longwriteImport(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 longwriteStore(StorageDataFile<?> targetFile, ByteBuffer[] byteBuffers)default longwriteTransactionEntryCreate(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageDataFile<?> dataFile)default longwriteTransactionEntryDelete(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageDataFile<?> dataFile)default longwriteTransactionEntryStore(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageDataFile<?> dataFile, long dataFileOffset, long storeLength)default longwriteTransactionEntryTransfer(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageDataFile<?> dataFile, long dataFileOffset, long storeLength)default longwriteTransactionEntryTruncate(StorageInventoryFile transactionFile, ByteBuffer[] byteBuffers, StorageInventoryFile file, long newFileLength)default longwriteTransfer(StorageDataFile<?> sourceFile, long sourceOffset, long copyLength, StorageDataFile<?> targetFile)
-
Method Details
-
validateIoByteCount
static long validateIoByteCount(long specifiedByteCount, long actualByteCount) -
write
-
copy
-
copyFilePart
default long copyFilePart(StorageLockedFile sourceFile, long sourceOffset, long length, StorageLockedFile targetfile) -
writeStore
-
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
-
deleteFile
-
createFileFullCopy
-
rescueFromDeletion
static boolean rescueFromDeletion(StorageNumberedFile file, StorageFileProvider storageFileProvider) -
flush
-