Package one.microstream.storage.types
Interface StorageFileWriter
-
- All Known Subinterfaces:
StorageFileWriterBackupping
- All Known Implementing Classes:
StorageFileWriter.Default,StorageFileWriterBackupping.Default
public interface StorageFileWriterFunction 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
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description static voidcreateFileFullCopy(StorageFile sourceFile, one.microstream.afs.types.AFile targetFile)default voiddelete(StorageLiveDataFile file, StorageWriteController writeController, StorageFileProvider fileProvider)static voiddeleteFile(StorageChannelFile file, StorageWriteController writeController, StorageFileProvider fileProvider)static booleanrescueFromDeletion(StorageChannelFile file, StorageWriteController writeController, StorageFileProvider fileProvider)default voidtruncate(StorageLiveChannelFile<?> file, long newLength, StorageFileProvider fileProvider)static voidtruncateFile(StorageTruncatableChannelFile file, long newLength, StorageFileProvider fileProvider)static longvalidateIoByteCount(long specifiedByteCount, long actualByteCount)default longwrite(StorageFile file, Iterable<? extends ByteBuffer> buffers)default longwriteImport(StorageImportSource source, 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 longwriteStore(StorageLiveDataFile targetFile, Iterable<? extends ByteBuffer> byteBuffers)default longwriteTransactionEntryCreate(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile)default longwriteTransactionEntryDelete(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile)default longwriteTransactionEntryStore(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile, long dataFileOffset, long storeLength)default longwriteTransactionEntryTransfer(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile, long dataFileOffset, long storeLength)default longwriteTransactionEntryTruncate(StorageLiveTransactionsFile transactionFile, Iterable<? extends ByteBuffer> byteBuffers, StorageLiveDataFile dataFile, long newFileLength)default longwriteTransfer(StorageLiveDataFile sourceFile, long sourceOffset, long copyLength, StorageLiveDataFile targetFile)
-
-
-
Method Detail
-
validateIoByteCount
static long validateIoByteCount(long specifiedByteCount, long actualByteCount)
-
write
default long write(StorageFile file, Iterable<? extends ByteBuffer> buffers)
-
writeStore
default long writeStore(StorageLiveDataFile targetFile, Iterable<? extends ByteBuffer> byteBuffers)
-
writeImport
default long writeImport(StorageImportSource source, long sourceOffset, long copyLength, StorageLiveDataFile targetFile)
Logically the same as a store, but technically the same as a transfer with an external source file.- Parameters:
source- the import sourcesourceOffset- the source offsetcopyLength- the copy lengthtargetFile- the target file- Returns:
- the amount of bytes written
-
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
static void createFileFullCopy(StorageFile sourceFile, one.microstream.afs.types.AFile targetFile)
-
rescueFromDeletion
static boolean rescueFromDeletion(StorageChannelFile file, StorageWriteController writeController, StorageFileProvider fileProvider)
-
-