org.apache.cassandra.db

## Class BufferExpiringCell

- java.lang.Object
- - org.apache.cassandra.db.AbstractCell
  - - org.apache.cassandra.db.BufferCell
    - - org.apache.cassandra.db.BufferExpiringCell

All Implemented Interfaces:
  Cell, ExpiringCell, OnDiskAtom

    public class BufferExpiringCell
    extends BufferCell
    implements ExpiringCell

### Nested Class Summary

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

`OnDiskAtom.Serializer, OnDiskAtom.SerializerForWriting`

### Field Summary

Fields
`static int` `MAX_DELETION_TIME`

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

`name, timestamp, value`

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

`MAX_TTL`

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

`MAX_NAME_LENGTH`

### Constructor Summary

Constructors
Constructor and Description
`BufferExpiringCell(CellName name, java.nio.ByteBuffer value, long timestamp, int timeToLive)`
`BufferExpiringCell(CellName name, java.nio.ByteBuffer value, long timestamp, int timeToLive, int localExpirationTime)`

### Method Summary

All Methods Static Methods Instance Methods Concrete Methods
`int` `cellDataSize()`
`static Cell` `create(CellName name, java.nio.ByteBuffer value, long timestamp, int timeToLive, int localExpirationTime, int expireBefore, ColumnSerializer.Flag flag)`
`boolean` `equals(Cell cell)`
`int` `getLocalDeletionTime()`
`java.lang.String` `getString(CellNameType comparator)`
`int` `getTimeToLive()`
`boolean` `isLive()`
`boolean` `isLive(long now)`
`ExpiringCell` `localCopy(CFMetaData metadata, AbstractAllocator allocator)`
`ExpiringCell` `localCopy(CFMetaData metadata, MemtableAllocator allocator, OpOrder.Group opGroup)`
`Cell` `reconcile(Cell cell)`
`int` `serializationFlags()`
`int` `serializedSize(CellNameType type, TypeSizes typeSizes)`
`void` `updateDigest(java.security.MessageDigest digest)`
`void` `validateFields(CFMetaData metadata)`
`Cell` `withUpdatedName(CellName newName)`
`Cell` `withUpdatedTimestamp(long newTimestamp)`
`Cell` `withUpdatedTimestampAndLocalDeletionTime(long newTimestamp, int newLocalDeletionTime)`

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

`name, timestamp, unsharedHeapSizeExcludingData, value`

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

`create, diff, diffCounter, equals, hashCode, 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

`diff, name, unsharedHeapSizeExcludingData, value`

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

`timestamp`

### Field Detail

#### MAX_DELETION_TIME

    public static final int MAX_DELETION_TIME

See Also:
  Constant Field Values

### Constructor Detail

#### BufferExpiringCell

    public BufferExpiringCell(CellName name,
                              java.nio.ByteBuffer value,
                              long timestamp,
                              int timeToLive)

#### BufferExpiringCell

    public BufferExpiringCell(CellName name,
                              java.nio.ByteBuffer value,
                              long timestamp,
                              int timeToLive,
                              int localExpirationTime)

### Method Detail

#### getTimeToLive

    public int getTimeToLive()

Specified by:
  `getTimeToLive` in interface `ExpiringCell`

#### withUpdatedName

    public Cell withUpdatedName(CellName newName)

Specified by:
  `withUpdatedName` in interface `Cell`
Overrides:
  `withUpdatedName` in class `BufferCell`

#### withUpdatedTimestamp

    public Cell withUpdatedTimestamp(long newTimestamp)

Specified by:
  `withUpdatedTimestamp` in interface `Cell`
Overrides:
  `withUpdatedTimestamp` in class `BufferCell`

#### withUpdatedTimestampAndLocalDeletionTime

    public Cell withUpdatedTimestampAndLocalDeletionTime(long newTimestamp,
                                                         int newLocalDeletionTime)

Specified by:
  `withUpdatedTimestampAndLocalDeletionTime` in interface `Cell`
Overrides:
  `withUpdatedTimestampAndLocalDeletionTime` in class `BufferCell`

#### 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`

#### updateDigest

    public void updateDigest(java.security.MessageDigest digest)

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

#### getLocalDeletionTime

    public int getLocalDeletionTime()

Specified by:
  `getLocalDeletionTime` in interface `OnDiskAtom`
Overrides:
  `getLocalDeletionTime` in class `AbstractCell`

#### localCopy

    public ExpiringCell localCopy(CFMetaData metadata,
                                  AbstractAllocator allocator)

Specified by:
  `localCopy` in interface `Cell`
Specified by:
  `localCopy` in interface `ExpiringCell`
Overrides:
  `localCopy` in class `BufferCell`

#### localCopy

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

Specified by:
  `localCopy` in interface `Cell`
Specified by:
  `localCopy` in interface `ExpiringCell`
Overrides:
  `localCopy` in class `BufferCell`

#### getString

    public java.lang.String getString(CellNameType comparator)

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

#### isLive

    public boolean isLive()

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

#### isLive

    public boolean isLive(long now)

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

#### serializationFlags

    public int serializationFlags()

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

#### validateFields

    public void validateFields(CFMetaData metadata)
                        throws MarshalException

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

#### reconcile

    public Cell reconcile(Cell cell)

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

#### equals

    public boolean equals(Cell cell)

Overrides:
  `equals` in class `AbstractCell`

#### create

    public static Cell create(CellName name,
                              java.nio.ByteBuffer value,
                              long timestamp,
                              int timeToLive,
                              int localExpirationTime,
                              int expireBefore,
                              ColumnSerializer.Flag flag)

Returns:
  Either a DeletedCell, or an ExpiringCell.