org.apache.cassandra.db

## Class ExpiringColumn

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

All Implemented Interfaces:
  OnDiskAtom

    public class ExpiringColumn
    extends Column

Alternative to Column that have an expiring time. ExpiringColumn is immutable (as Column is). Note that ExpiringColumn does not override Column.getMarkedForDeleteAt, which means that it's in the somewhat unintuitive position of being deleted (after its expiration) without having a time-at-which-it-became-deleted. (Because ttl is a server-side measurement, we can't mix it with the timestamp field, which is client-supplied and whose resolution we can't assume anything about.)

### Nested Class Summary

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

`OnDiskAtom.Serializer`

### Field Summary

Fields
`static int` `MAX_TTL`

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

`MAX_NAME_LENGTH, name, serializer, timestamp, value`

### Constructor Summary

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

### Method Summary

Methods
`static Column` `create(java.nio.ByteBuffer name, java.nio.ByteBuffer value, long timestamp, int timeToLive, int localExpirationTime, int expireBefore, ColumnSerializer.Flag flag)`
`int` `dataSize()`
`boolean` `equals(java.lang.Object o)`
`int` `getLocalDeletionTime()`
`long` `getMarkedForDeleteAt()`
`java.lang.String` `getString(AbstractType<?> comparator)`
`int` `getTimeToLive()`
`int` `hashCode()`
`boolean` `isMarkedForDelete(long now)`
`Column` `localCopy(ColumnFamilyStore cfs)`
`Column` `localCopy(ColumnFamilyStore cfs, Allocator allocator)`
`int` `serializationFlags()`
`int` `serializedSize(TypeSizes typeSizes)`
`void` `updateDigest(java.security.MessageDigest digest)`
`void` `validateFields(CFMetaData metadata)`
`Column` `withUpdatedName(java.nio.ByteBuffer newName)`
`Column` `withUpdatedTimestamp(long newTimestamp)`

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

`create, create, create, create, create, create, create, diff, hasIrrelevantData, isLive, maxTimestamp, minTimestamp, name, onDiskIterator, onDiskSerializer, reconcile, reconcile, serializedSizeForSSTable, timestamp, validateName, value`

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

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

### Field Detail

#### MAX_TTL

    public static final int MAX_TTL

See Also:
  Constant Field Values

### Constructor Detail

#### ExpiringColumn

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

#### ExpiringColumn

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

### Method Detail

#### create

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

Returns:
  Either a DeletedColumn, or an ExpiringColumn.

#### getTimeToLive

    public int getTimeToLive()

#### withUpdatedName

    public Column withUpdatedName(java.nio.ByteBuffer newName)

Overrides:
  `withUpdatedName` in class `Column`

#### withUpdatedTimestamp

    public Column withUpdatedTimestamp(long newTimestamp)

Overrides:
  `withUpdatedTimestamp` in class `Column`

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

#### updateDigest

    public void updateDigest(java.security.MessageDigest digest)

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

#### getLocalDeletionTime

    public int getLocalDeletionTime()

Specified by:
  `getLocalDeletionTime` in interface `OnDiskAtom`
Overrides:
  `getLocalDeletionTime` 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`

#### isMarkedForDelete

    public boolean isMarkedForDelete(long now)

Overrides:
  `isMarkedForDelete` in class `Column`

#### getMarkedForDeleteAt

    public long getMarkedForDeleteAt()

Overrides:
  `getMarkedForDeleteAt` 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`

#### equals

    public boolean equals(java.lang.Object o)

Overrides:
  `equals` in class `Column`

#### hashCode

    public int hashCode()

Overrides:
  `hashCode` in class `Column`