org.apache.cassandra.db.commitlog

## Class CompressedSegment

- java.lang.Object
- - org.apache.cassandra.db.commitlog.CommitLogSegment
  - - org.apache.cassandra.db.commitlog.FileDirectSegment
    - - org.apache.cassandra.db.commitlog.CompressedSegment

    public class CompressedSegment
    extends FileDirectSegment

Compressed commit log segment. Provides an in-memory buffer for the mutation threads. On sync compresses the written section of the buffer and writes it to the destination channel. The format of the compressed commit log is as follows: - standard commit log header (as written by `CommitLogDescriptor.writeHeader(ByteBuffer, CommitLogDescriptor)`) - a series of 'sync segments' that are written every time the commit log is sync()'ed -- a sync section header, see `CommitLogSegment.writeSyncMarker(long, ByteBuffer, int, int, int)` -- total plain text length for this section -- a block of compressed data

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.cassandra.db.commitlog.CommitLogSegment

`CommitLogSegment.Allocation, CommitLogSegment.CDCState, CommitLogSegment.CommitLogSegmentFileComparator`

### Field Summary

### Fields inherited from class org.apache.cassandra.db.commitlog.CommitLogSegment

`descriptor, ENTRY_OVERHEAD_SIZE, id, manager`

### Method Summary

All Methods Instance Methods Concrete Methods
`long` `onDiskSize()`

### Methods inherited from class org.apache.cassandra.db.commitlog.FileDirectSegment

`flush, internalClose`

### Methods inherited from class org.apache.cassandra.db.commitlog.CommitLogSegment

`additionalHeaderParameters, contains, contentSize, coverInMap, dirtyString, getCDCState, getCurrentCommitLogPosition, getDirtyCFIDs, getName, getPath, isStillAllocating, isUnused, markClean, setCDCState, toString, writeSyncMarker`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Method Detail

#### onDiskSize

    public long onDiskSize()

Specified by:
  `onDiskSize` in class `CommitLogSegment`