Package one.microstream.storage.types
Interface StorageFileWriter
- All Known Subinterfaces:
StorageFileWriterBackupping
- All Known Implementing Classes:
StorageFileWriter.Default
,StorageFileWriterBackupping.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 static void
createFileFullCopy(StorageFile sourceFile, AFile targetFile)
default void
delete(StorageLiveDataFile file, StorageWriteController writeController, StorageFileProvider fileProvider)
static void
deleteFile(StorageChannelFile file, StorageWriteController writeController, StorageFileProvider fileProvider)
static boolean
rescueFromDeletion(StorageChannelFile file, StorageWriteController writeController, StorageFileProvider fileProvider)
default void
truncate(StorageLiveChannelFile<?> file, long newLength, StorageFileProvider fileProvider)
static void
truncateFile(StorageTruncatableChannelFile file, long newLength, StorageFileProvider fileProvider)
static long
validateIoByteCount(long specifiedByteCount, long actualByteCount)
default long
write(StorageFile file, Iterable<? extends ByteBuffer> buffers)
default long
writeImport(StorageFile sourceFile, long sourceOffset, long copyLength, StorageLiveDataFile targetFile)
Logically the same as a store, but technically the same as a transfer with an external source file.default long
writeStore(StorageLiveDataFile targetFile, Iterable<? extends ByteBuffer> byteBuffers)
default long
writeTransactionEntryCreate(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile)
default long
writeTransactionEntryDelete(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile)
default long
writeTransactionEntryStore(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile, long dataFileOffset, long storeLength)
default long
writeTransactionEntryTransfer(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile, long dataFileOffset, long storeLength)
default long
writeTransactionEntryTruncate(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile, long newFileLength)
default long
writeTransfer(StorageLiveDataFile sourceFile, long sourceOffset, long copyLength, StorageLiveDataFile targetFile)
-
Method Details
-
validateIoByteCount
static long validateIoByteCount(long specifiedByteCount, long actualByteCount) -
write
-
writeStore
default long writeStore(StorageLiveDataFile targetFile, Iterable<? extends ByteBuffer> byteBuffers) -
writeImport
default long writeImport(StorageFile sourceFile, long sourceOffset, long copyLength, StorageLiveDataFile targetFile)Logically the same as a store, but technically the same as a transfer with an external source file. -
writeTransfer
default long writeTransfer(StorageLiveDataFile sourceFile, long sourceOffset, long copyLength, StorageLiveDataFile targetFile) -
writeTransactionEntryCreate
default long writeTransactionEntryCreate(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile) -
writeTransactionEntryStore
default long writeTransactionEntryStore(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile, long dataFileOffset, long storeLength) -
writeTransactionEntryTransfer
default long writeTransactionEntryTransfer(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile, long dataFileOffset, long storeLength) -
writeTransactionEntryDelete
default long writeTransactionEntryDelete(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile) -
writeTransactionEntryTruncate
default long writeTransactionEntryTruncate(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile, long newFileLength) -
truncate
default void truncate(StorageLiveChannelFile<?> file, long newLength, StorageFileProvider fileProvider) -
truncateFile
static void truncateFile(StorageTruncatableChannelFile file, long newLength, StorageFileProvider fileProvider) -
delete
default void delete(StorageLiveDataFile file, StorageWriteController writeController, StorageFileProvider fileProvider) -
deleteFile
static void deleteFile(StorageChannelFile file, StorageWriteController writeController, StorageFileProvider fileProvider) -
createFileFullCopy
-
rescueFromDeletion
static boolean rescueFromDeletion(StorageChannelFile file, StorageWriteController writeController, StorageFileProvider fileProvider)
-