org.apache.cassandra.db.commitlog

## Class CommitLogPosition

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

All Implemented Interfaces:
  java.lang.Comparable<CommitLogPosition>

Direct Known Subclasses:
  Memtable.LastCommitLogPosition

    public class CommitLogPosition
    extends java.lang.Object
    implements java.lang.Comparable<CommitLogPosition>

Contains a segment id and a position for CommitLogSegment identification. Used for both replay and general CommitLog file reading.

### Nested Class Summary

Nested Classes
`static class` `CommitLogPosition.CommitLogPositionSerializer`

### Field Summary

Fields
`static java.util.Comparator<CommitLogPosition>` `comparator`
`static CommitLogPosition` `NONE`
`int` `position`
`long` `segmentId`
`static CommitLogPosition.CommitLogPositionSerializer` `serializer`

### Constructor Summary

Constructors
Constructor and Description
`CommitLogPosition(long segmentId, int position)`

### Method Summary

All Methods Instance Methods Concrete Methods
`CommitLogPosition` `clone()`
`int` `compareTo(CommitLogPosition other)`
`boolean` `equals(java.lang.Object o)`
`int` `hashCode()`
`java.lang.String` `toString()`

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

`finalize, getClass, notify, notifyAll, wait, wait, wait`

### Field Detail

#### serializer

    public static final CommitLogPosition.CommitLogPositionSerializer serializer

#### NONE

    public static final CommitLogPosition NONE

#### segmentId

    public final long segmentId

#### position

    public final int position

#### comparator

    public static final java.util.Comparator<CommitLogPosition> comparator

### Constructor Detail

#### CommitLogPosition

    public CommitLogPosition(long segmentId,
                             int position)

### Method Detail

#### compareTo

    public int compareTo(CommitLogPosition other)

Specified by:
  `compareTo` in interface `java.lang.Comparable<CommitLogPosition>`

#### equals

    public boolean equals(java.lang.Object o)

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

#### hashCode

    public int hashCode()

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

#### toString

    public java.lang.String toString()

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

#### clone

    public CommitLogPosition clone()

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