public class CompressedSequentialWriter extends SequentialWriter
| Modifier and Type | Class and Description |
|---|---|
protected static class |
CompressedSequentialWriter.CompressedFileWriterMark
Class to hold a mark to the position of the file
|
protected class |
CompressedSequentialWriter.TransactionalProxy |
SequentialWriter.BufferedFileWriterMarkTransactional.AbstractTransactionalbuffer, bufferOffset, channel, descriptor, isDirty, lastFlushOffset, runPostFlush, stream, syncNeeded| Constructor and Description |
|---|
CompressedSequentialWriter(java.io.File file,
java.lang.String offsetsPath,
CompressionParameters parameters,
MetadataCollector sstableMetadataCollector) |
| Modifier and Type | Method and Description |
|---|---|
void |
flush()
If buffer is dirty, flush it's contents to the operating system.
|
protected void |
flushData()
Override this method instead of overriding flush()
|
long |
getOnDiskFilePointer()
Returns the current file pointer of the underlying on-disk file.
|
FileMark |
mark() |
CompressionMetadata |
open(long overrideLength) |
void |
resetAndTruncate(FileMark mark)
Drops all buffered data that's past the limits of our new file mark + buffer capacity, or syncs and truncates
the underlying file to the marked position
|
protected SequentialWriter.TransactionalProxy |
txnProxy() |
abort, close, commit, current, deleteFile, finish, flushInternal, getFilePointer, getLastFlushOffset, getPath, isOpen, length, open, open, open, prepareToCommit, reBuffer, releaseFileHandle, resetBuffer, setDescriptor, setPostFlushListener, sync, syncDataOnlyInternal, syncInternal, truncate, write, write, write, writepublic CompressedSequentialWriter(java.io.File file,
java.lang.String offsetsPath,
CompressionParameters parameters,
MetadataCollector sstableMetadataCollector)
public long getOnDiskFilePointer()
SequentialWritergetOnDiskFilePointer in class SequentialWriterpublic void flush()
SequentialWriterflush in interface java.io.Flushableflush in class SequentialWriterprotected void flushData()
SequentialWriterflushData in class SequentialWriterpublic CompressionMetadata open(long overrideLength)
public FileMark mark()
mark in class SequentialWriterpublic void resetAndTruncate(FileMark mark)
SequentialWriterresetAndTruncate in class SequentialWriterprotected SequentialWriter.TransactionalProxy txnProxy()
txnProxy in class SequentialWriterCopyright © 2015 The Apache Software Foundation