CompressedSequentialWriter (apache-cassandra API)
Date: 2012-05-04

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.io.compress
Class CompressedSequentialWriter

    java.lang.Object
      java.io.OutputStream
          org.apache.cassandra.io.util.SequentialWriter
              org.apache.cassandra.io.compress.CompressedSequentialWriter

All Implemented Interfaces:
  java.io.Closeable, java.io.Flushable

    public class CompressedSequentialWriter

extends SequentialWriter

Nested Class Summary
`protected static class` | `CompressedSequentialWriter.CompressedFileWriterMark` Class to hold a mark to the position of the file

Nested classes/interfaces inherited from class org.apache.cassandra.io.util.SequentialWriter
`SequentialWriter.BufferedFileWriterMark`

Field Summary

Fields inherited from class org.apache.cassandra.io.util.SequentialWriter
`buffer, bufferOffset, current, isDirty, out, stream, syncNeeded, validBufferBytes`

Constructor Summary
`CompressedSequentialWriter(java.io.File file, java.lang.String indexFilePath, boolean skipIOCache, CompressionParameters parameters, SSTableMetadata.Collector sstableMetadataCollector)`

Method Summary
`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()
`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.

Methods inherited from class org.apache.cassandra.io.util.SequentialWriter
`digest, flushInternal, getFilePointer, getPath, length, open, open, open, reBuffer, resetBuffer, setComputeDigest, syncInternal, truncate, write, write, write`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CompressedSequentialWriter

    public CompressedSequentialWriter(java.io.File file,
                                      java.lang.String indexFilePath,
                                      boolean skipIOCache,
                                      CompressionParameters parameters,
                                      SSTableMetadata.Collector sstableMetadataCollector)
                               throws java.io.IOException

Throws:
  `java.io.IOException`

Method Detail

### open

    public static SequentialWriter open(java.lang.String dataFilePath,
                                        java.lang.String indexFilePath,
                                        boolean skipIOCache,
                                        CompressionParameters parameters,
                                        SSTableMetadata.Collector sstableMetadataCollector)
                                 throws java.io.IOException

  Throws:
    `java.io.IOException`

### sync

    public void sync()
              throws java.io.IOException

  Description copied from class: `SequentialWriter`
  Synchronize file contents with disk.

  Overrides:
    `sync` in class `SequentialWriter`
  Throws:
    `java.io.IOException` - on any I/O error.

### flush

    public void flush()
               throws java.io.IOException

  Description copied from class: `SequentialWriter`
  If buffer is dirty, flush it's contents to the operating system. Does not imply fsync(). Currently, for implementation reasons, this also invalidates the buffer.

  Specified by:
    `flush` in interface `java.io.Flushable`
  Overrides:
    `flush` in class `SequentialWriter`
  Throws:
    `java.io.IOException` - on any I/O error.

### flushData

    protected void flushData()
                      throws java.io.IOException

  Description copied from class: `SequentialWriter`
  Override this method instead of overriding flush()

  Overrides:
    `flushData` in class `SequentialWriter`
  Throws:
    `java.io.IOException` - on any I/O error.

### mark

    public FileMark mark()

  Overrides:
    `mark` in class `SequentialWriter`

### resetAndTruncate

    public void resetAndTruncate(FileMark mark)
                          throws java.io.IOException

  Overrides:
    `resetAndTruncate` in class `SequentialWriter`
  Throws:
    `java.io.IOException`

### close

    public void close()
               throws java.io.IOException

  Specified by:
    `close` in interface `java.io.Closeable`
  Overrides:
    `close` in class `SequentialWriter`
  Throws:
    `java.io.IOException`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 The Apache Software Foundation