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
|
SequentialWriter.BufferedFileWriterMark
buffer, bufferOffset, current, isDirty, out, stream, syncNeeded, validBufferBytes
Constructor and Description |
---|
CompressedSequentialWriter(java.io.File file,
java.lang.String indexFilePath,
boolean skipIOCache,
CompressionParameters parameters,
SSTableMetadata.Collector sstableMetadataCollector) |
Modifier and Type | Method and Description |
---|---|
void |
close() |
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()
Return the current file pointer of the underlying on-disk file.
|
FileMark |
mark() |
static SequentialWriter |
open(java.lang.String dataFilePath,
java.lang.String indexFilePath,
boolean skipIOCache,
CompressionParameters parameters,
SSTableMetadata.Collector sstableMetadataCollector) |
void |
resetAndTruncate(FileMark mark) |
void |
sync()
Synchronize file contents with disk.
|
flushInternal, getFilePointer, getPath, length, open, open, open, reBuffer, resetBuffer, setDataIntegrityWriter, syncDataOnlyInternal, syncInternal, truncate, write, write, write
public CompressedSequentialWriter(java.io.File file, java.lang.String indexFilePath, boolean skipIOCache, CompressionParameters parameters, SSTableMetadata.Collector sstableMetadataCollector)
public static SequentialWriter open(java.lang.String dataFilePath, java.lang.String indexFilePath, boolean skipIOCache, CompressionParameters parameters, SSTableMetadata.Collector sstableMetadataCollector)
public long getOnDiskFilePointer()
SequentialWriter
getOnDiskFilePointer
in class SequentialWriter
public void sync()
SequentialWriter
sync
in class SequentialWriter
public void flush()
SequentialWriter
flush
in interface java.io.Flushable
flush
in class SequentialWriter
protected void flushData()
SequentialWriter
flushData
in class SequentialWriter
public FileMark mark()
mark
in class SequentialWriter
public void resetAndTruncate(FileMark mark)
resetAndTruncate
in class SequentialWriter
public void close()
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class SequentialWriter
Copyright © 2013 The Apache Software Foundation