CommitLogSegment (apache-cassandra API)
Date: 2014-10-21

org.apache.cassandra.db.commitlog

## Class CommitLogSegment

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

-     public class CommitLogSegment
      extends java.lang.Object

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `CommitLogSegment.CommitLogSegmentFileComparator`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `CommitLogDescriptor` | `descriptor`
    `static int` | `ENTRY_OVERHEAD_SIZE`
    `long` | `id`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `contains(ReplayPosition context)` Check to see if a certain ReplayPosition is contained by this segment file.
    `java.lang.String` | `dirtyString()`
    `ReplayPosition` | `getContext()`
    `java.util.Collection<java.util.UUID>` | `getDirtyCFIDs()`
    `java.lang.String` | `getName()`
    `java.lang.String` | `getPath()`
    `boolean` | `isStillAllocating()`
    `boolean` | `isUnused()`
    `void` | `markClean(java.util.UUID cfId, ReplayPosition context)` Marks the ColumnFamily specified by cfId as clean for this log segment.
    `java.lang.String` | `toString()`

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

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

- - ### Field Detail

    - #### ENTRY_OVERHEAD_SIZE

          public static final int ENTRY_OVERHEAD_SIZE

      See Also:
        Constant Field Values

    - #### id

          public final long id

    - #### descriptor

          public final CommitLogDescriptor descriptor

  - ### Method Detail

    - #### isStillAllocating

          public boolean isStillAllocating()

    - #### getContext

          public ReplayPosition getContext()

      Returns:
        the current ReplayPosition for this log segment

    - #### getPath

          public java.lang.String getPath()

      Returns:
        the file path to this segment

    - #### getName

          public java.lang.String getName()

      Returns:
        the file name of this segment

    - #### markClean

          public void markClean(java.util.UUID cfId,
                       ReplayPosition context)

      Marks the ColumnFamily specified by cfId as clean for this log segment. If the given context argument is contained in this file, it will only mark the CF as clean if no newer writes have taken place.
      Parameters:
        `cfId` - the column family ID that is now clean
        `context` - the optional clean offset

    - #### getDirtyCFIDs

          public java.util.Collection<java.util.UUID> getDirtyCFIDs()

      Returns:
        a collection of dirty CFIDs for this segment file.

    - #### isUnused

          public boolean isUnused()

      Returns:
        true if this segment is unused and safe to recycle or delete

    - #### contains

          public boolean contains(ReplayPosition context)

      Check to see if a certain ReplayPosition is contained by this segment file.
      Parameters:
        `context` - the replay position to be checked
      Returns:
        true if the replay position is contained by this segment file.

    - #### dirtyString

          public java.lang.String dirtyString()

    - #### toString

          public java.lang.String toString()

      Overrides:
        `toString` in class `java.lang.Object`

Copyright © 2014 The Apache Software Foundation