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.BufferedFileWriterMark
Transactional.AbstractTransactional
bufferOffset, descriptor, fchannel, lastFlushOffset, runPostFlush
buffer, strictFlushing
channel
Constructor and Description |
---|
CompressedSequentialWriter(java.io.File file,
java.lang.String offsetsPath,
CompressionParams parameters,
MetadataCollector sstableMetadataCollector) |
Modifier and Type | Method and Description |
---|---|
void |
flush() |
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, doFlush, finish, finishOnClose, getLastFlushOffset, getPath, hasPosition, isOpen, length, open, open, open, position, prepareToCommit, resetBuffer, setDescriptor, setPostFlushListener, sync, syncDataOnlyInternal, syncInternal, truncate
applyToChannel, order, write, write, write, write, write, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUnsignedVInt, writeUTF, writeVInt
newDefaultChannel, retrieveTemporaryBuffer
public CompressedSequentialWriter(java.io.File file, java.lang.String offsetsPath, CompressionParams parameters, MetadataCollector sstableMetadataCollector)
public long getOnDiskFilePointer()
SequentialWriter
getOnDiskFilePointer
in class SequentialWriter
public void flush()
flush
in interface java.io.Flushable
flush
in class BufferedDataOutputStreamPlus
protected void flushData()
SequentialWriter
flushData
in class SequentialWriter
public CompressionMetadata open(long overrideLength)
public FileMark mark()
mark
in class SequentialWriter
public void resetAndTruncate(FileMark mark)
SequentialWriter
resetAndTruncate
in class SequentialWriter
protected SequentialWriter.TransactionalProxy txnProxy()
txnProxy
in class SequentialWriter
Copyright © 2015 The Apache Software Foundation