org.apache.cassandra.db

## Class CounterColumn

- java.lang.Object
- - org.apache.cassandra.db.Column
  - - org.apache.cassandra.db.CounterColumn

All Implemented Interfaces:
  OnDiskAtom

    public class CounterColumn
    extends Column

A column that represents a partitioned counter.

### Nested Class Summary

### Nested classes/interfaces inherited from interface org.apache.cassandra.db.OnDiskAtom

`OnDiskAtom.Serializer`

### Field Summary

Fields
`protected static CounterContext` `contextManager`

### Fields inherited from class org.apache.cassandra.db.Column

`MAX_NAME_LENGTH, name, serializer, timestamp, value`

### Constructor Summary

Constructors
Constructor and Description
`CounterColumn(java.nio.ByteBuffer name, java.nio.ByteBuffer value, long timestamp)`
`CounterColumn(java.nio.ByteBuffer name, java.nio.ByteBuffer value, long timestamp, long timestampOfLastDelete)`
`CounterColumn(java.nio.ByteBuffer name, long value, long timestamp)`
`CounterColumn(java.nio.ByteBuffer name, long value, long timestamp, long timestampOfLastDelete)`

### Method Summary

Methods
`static CounterColumn` `create(java.nio.ByteBuffer name, java.nio.ByteBuffer value, long timestamp, long timestampOfLastDelete, ColumnSerializer.Flag flag)`
`int` `dataSize()`
`Column` `diff(Column column)`
`boolean` `equals(java.lang.Object o)`
`java.lang.String` `getString(AbstractType<?> comparator)`
`boolean` `hasCounterId(CounterId id)` Check if a given counterId is found in this CounterColumn context.
`int` `hashCode()`
`Column` `localCopy(ColumnFamilyStore cfs)`
`Column` `localCopy(ColumnFamilyStore cfs, Allocator allocator)`
`Column` `markLocalToBeCleared()`
`Column` `reconcile(Column column, Allocator allocator)`
`int` `serializationFlags()`
`int` `serializedSize(TypeSizes typeSizes)`
`long` `timestampOfLastDelete()`
`long` `total()`
`void` `updateDigest(java.security.MessageDigest digest)`
`void` `validateFields(CFMetaData metadata)`
`Column` `withUpdatedName(java.nio.ByteBuffer newName)`

### Methods inherited from class org.apache.cassandra.db.Column

`create, create, create, create, create, create, create, getLocalDeletionTime, getMarkedForDeleteAt, hasIrrelevantData, isLive, isMarkedForDelete, maxTimestamp, minTimestamp, name, onDiskIterator, onDiskSerializer, reconcile, serializedSizeForSSTable, timestamp, validateName, value, withUpdatedTimestamp`

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

`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### contextManager

    protected static final CounterContext contextManager

### Constructor Detail

#### CounterColumn

    public CounterColumn(java.nio.ByteBuffer name,
                 long value,
                 long timestamp)

#### CounterColumn

    public CounterColumn(java.nio.ByteBuffer name,
                 long value,
                 long timestamp,
                 long timestampOfLastDelete)

#### CounterColumn

    public CounterColumn(java.nio.ByteBuffer name,
                 java.nio.ByteBuffer value,
                 long timestamp)

#### CounterColumn

    public CounterColumn(java.nio.ByteBuffer name,
                 java.nio.ByteBuffer value,
                 long timestamp,
                 long timestampOfLastDelete)

### Method Detail

#### create

    public static CounterColumn create(java.nio.ByteBuffer name,
                       java.nio.ByteBuffer value,
                       long timestamp,
                       long timestampOfLastDelete,
                       ColumnSerializer.Flag flag)

#### withUpdatedName

    public Column withUpdatedName(java.nio.ByteBuffer newName)

Overrides:
  `withUpdatedName` in class `Column`

#### timestampOfLastDelete

    public long timestampOfLastDelete()

#### total

    public long total()

#### dataSize

    public int dataSize()

Overrides:
  `dataSize` in class `Column`

#### serializedSize

    public int serializedSize(TypeSizes typeSizes)

Specified by:
  `serializedSize` in interface `OnDiskAtom`
Overrides:
  `serializedSize` in class `Column`

#### diff

    public Column diff(Column column)

Overrides:
  `diff` in class `Column`

#### updateDigest

    public void updateDigest(java.security.MessageDigest digest)

Specified by:
  `updateDigest` in interface `OnDiskAtom`
Overrides:
  `updateDigest` in class `Column`

#### reconcile

    public Column reconcile(Column column,
                   Allocator allocator)

Overrides:
  `reconcile` in class `Column`

#### equals

    public boolean equals(java.lang.Object o)

Overrides:
  `equals` in class `Column`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Column`

#### localCopy

    public Column localCopy(ColumnFamilyStore cfs)

Overrides:
  `localCopy` in class `Column`

#### localCopy

    public Column localCopy(ColumnFamilyStore cfs,
                   Allocator allocator)

Overrides:
  `localCopy` in class `Column`

#### getString

    public java.lang.String getString(AbstractType<?> comparator)

Overrides:
  `getString` in class `Column`

#### serializationFlags

    public int serializationFlags()

Overrides:
  `serializationFlags` in class `Column`

#### validateFields

    public void validateFields(CFMetaData metadata)
                        throws MarshalException

Specified by:
  `validateFields` in interface `OnDiskAtom`
Overrides:
  `validateFields` in class `Column`
Throws:
  `MarshalException`

#### hasCounterId

    public boolean hasCounterId(CounterId id)

Check if a given counterId is found in this CounterColumn context.

#### markLocalToBeCleared

    public Column markLocalToBeCleared()