org.apache.cassandra.db

## Class NativeCounterCell

- java.lang.Object
- - org.apache.cassandra.db.AbstractCell
  - - org.apache.cassandra.db.AbstractNativeCell
    - - org.apache.cassandra.db.NativeCell
      - - org.apache.cassandra.db.NativeCounterCell

All Implemented Interfaces:
  IMeasurableMemory, Cell, CellName, Composite, CounterCell, OnDiskAtom

    public class NativeCounterCell
    extends NativeCell
    implements CounterCell

### Nested Class Summary

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

`OnDiskAtom.Serializer, OnDiskAtom.SerializerForWriting`

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

`Composite.EOC`

### Field Summary

### Fields inherited from interface org.apache.cassandra.db.CounterCell

`contextManager`

### Fields inherited from interface org.apache.cassandra.db.Cell

`MAX_NAME_LENGTH`

### Constructor Summary

Constructors
Constructor and Description
`NativeCounterCell(NativeAllocator allocator, OpOrder.Group writeOp, CounterCell copyOf)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `cellDataSize()`
`protected void` `construct(Cell from)`
`Cell` `diff(Cell cell)`
`boolean` `equals(Cell cell)`
`java.lang.String` `getString(CellNameType comparator)`
`boolean` `hasLegacyShards()`
`CounterCell` `localCopy(CFMetaData metadata, AbstractAllocator allocator)`
`CounterCell` `localCopy(CFMetaData metadata, MemtableAllocator allocator, OpOrder.Group opGroup)`
`Cell` `markLocalToBeCleared()`
`protected int` `postfixSize()`
`Cell` `reconcile(Cell cell)`
`int` `serializationFlags()`
`int` `serializedSize(CellNameType type, TypeSizes typeSizes)`
`protected int` `sizeOf(Cell cell)`
`long` `timestampOfLastDelete()`
`long` `total()`
`long` `unsharedHeapSize()`
`long` `unsharedHeapSizeExcludingData()`
`void` `updateDigest(java.security.MessageDigest digest)`
`void` `validateFields(CFMetaData metadata)`

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

`name, timestamp`

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

`clusteringSize, collectionElement, compareTo, compareToSimple, copy, cql3ColumnName, dataSize, end, eoc, equals, equals, get, getByte, getByteBuffer, getBytes, getInt, getLong, getShort, internalSize, isCollectionCell, isEmpty, isPrefixOf, isSameCQL3RowAs, isStatic, maxTimestamp, minTimestamp, setByte, setBytes, setInt, setLong, setShort, size, slice, start, toByteBuffer, updateWithName, updateWithValue, value, withEOC, withUpdatedName, withUpdatedTimestamp, withUpdatedTimestampAndLocalDeletionTime, writeComponentTo, writeMemoryTo`

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

`create, diffCounter, getLocalDeletionTime, hashCode, isLive, isLive, onDiskIterator, reconcileCounter, validateName`

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

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

### Methods inherited from interface org.apache.cassandra.db.Cell

`isLive, isLive, name, value, withUpdatedName, withUpdatedTimestamp, withUpdatedTimestampAndLocalDeletionTime`

### Methods inherited from interface org.apache.cassandra.db.OnDiskAtom

`getLocalDeletionTime, timestamp`

### Constructor Detail

#### NativeCounterCell

    public NativeCounterCell(NativeAllocator allocator,
                             OpOrder.Group writeOp,
                             CounterCell copyOf)

### Method Detail

#### construct

    protected void construct(Cell from)

Overrides:
  `construct` in class `AbstractNativeCell`

#### postfixSize

    protected int postfixSize()

Overrides:
  `postfixSize` in class `AbstractNativeCell`

#### sizeOf

    protected int sizeOf(Cell cell)

Overrides:
  `sizeOf` in class `AbstractNativeCell`

#### timestampOfLastDelete

    public long timestampOfLastDelete()

Specified by:
  `timestampOfLastDelete` in interface `CounterCell`

#### total

    public long total()

Specified by:
  `total` in interface `CounterCell`

#### hasLegacyShards

    public boolean hasLegacyShards()

Specified by:
  `hasLegacyShards` in interface `CounterCell`

#### markLocalToBeCleared

    public Cell markLocalToBeCleared()

Specified by:
  `markLocalToBeCleared` in interface `CounterCell`

#### diff

    public Cell diff(Cell cell)

Specified by:
  `diff` in interface `Cell`
Overrides:
  `diff` in class `AbstractCell`

#### reconcile

    public Cell reconcile(Cell cell)

Specified by:
  `reconcile` in interface `Cell`
Overrides:
  `reconcile` in class `AbstractCell`

#### serializationFlags

    public int serializationFlags()

Specified by:
  `serializationFlags` in interface `Cell`
Overrides:
  `serializationFlags` in class `AbstractCell`

#### cellDataSize

    public int cellDataSize()

Specified by:
  `cellDataSize` in interface `Cell`
Overrides:
  `cellDataSize` in class `AbstractCell`

#### serializedSize

    public int serializedSize(CellNameType type,
                              TypeSizes typeSizes)

Specified by:
  `serializedSize` in interface `Cell`
Overrides:
  `serializedSize` in class `AbstractCell`

#### validateFields

    public void validateFields(CFMetaData metadata)
                        throws MarshalException

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

#### updateDigest

    public void updateDigest(java.security.MessageDigest digest)

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

#### getString

    public java.lang.String getString(CellNameType comparator)

Specified by:
  `getString` in interface `Cell`
Overrides:
  `getString` in class `AbstractCell`

#### localCopy

    public CounterCell localCopy(CFMetaData metadata,
                                 AbstractAllocator allocator)

Specified by:
  `localCopy` in interface `Cell`
Specified by:
  `localCopy` in interface `CounterCell`
Overrides:
  `localCopy` in class `NativeCell`

#### localCopy

    public CounterCell localCopy(CFMetaData metadata,
                                 MemtableAllocator allocator,
                                 OpOrder.Group opGroup)

Specified by:
  `localCopy` in interface `Cell`
Specified by:
  `localCopy` in interface `CounterCell`
Overrides:
  `localCopy` in class `NativeCell`

#### unsharedHeapSizeExcludingData

    public long unsharedHeapSizeExcludingData()

Specified by:
  `unsharedHeapSizeExcludingData` in interface `Cell`
Specified by:
  `unsharedHeapSizeExcludingData` in interface `CellName`
Overrides:
  `unsharedHeapSizeExcludingData` in class `NativeCell`

#### unsharedHeapSize

    public long unsharedHeapSize()

Specified by:
  `unsharedHeapSize` in interface `IMeasurableMemory`
Overrides:
  `unsharedHeapSize` in class `NativeCell`
Returns:
  the amount of on-heap memory retained by the object that might be reclaimed if the object were reclaimed, i.e. it should try to exclude globally cached data where possible, or counting portions of arrays that are referenced by the object but used by other objects only (e.g. slabbed byte-buffers), etc.

#### equals

    public boolean equals(Cell cell)

Overrides:
  `equals` in class `AbstractCell`