ExpiringColumn (apache-cassandra API)
Date: 2012-05-04

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.db
Class ExpiringColumn

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

All Implemented Interfaces:
  IColumn

    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.)

Field Summary

Fields inherited from class org.apache.cassandra.db.Column
`name, timestamp, value`

Fields inherited from interface org.apache.cassandra.db.IColumn
`MAX_NAME_LENGTH`

Constructor Summary
`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
`static Column` | `create(java.nio.ByteBuffer name, java.nio.ByteBuffer value, long timestamp, int timeToLive, int localExpirationTime, int expireBefore, IColumnSerializer.Flag flag)`
`int` | `getLocalDeletionTime()`
`long` | `getMarkedForDeleteAt()`
`java.lang.String` | `getString(AbstractType comparator)`
`int` | `getTimeToLive()`
`boolean` | `isMarkedForDelete()`
`IColumn` | `localCopy(ColumnFamilyStore cfs)` clones the column for the row cache, interning column names and making copies of other underlying byte buffers
`IColumn` | `localCopy(ColumnFamilyStore cfs, Allocator allocator)` clones the column for the memtable, interning column names and making copies of other underlying byte buffers.
`int` | `serializationFlags()`
`int` | `size()`
`void` | `updateDigest(java.security.MessageDigest digest)`
`void` | `validateFields(CFMetaData metadata)`

Methods inherited from class org.apache.cassandra.db.Column
`addColumn, addColumn, diff, equals, getSubColumn, getSubColumns, hasExpiredTombstones, hashCode, isLive, maxTimestamp, mostRecentLiveChangeAt, mostRecentNonGCableChangeAt, name, reconcile, reconcile, serializedSize, serializer, timestamp, validateName, value`

Methods inherited from class java.lang.Object
`clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait`

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,
                                IColumnSerializer.Flag flag)

  Returns:
    Either a DeletedColumn, or an ExpiringColumn.

### getTimeToLive

    public int getTimeToLive()

### isMarkedForDelete

    public boolean isMarkedForDelete()

  Specified by:
    `isMarkedForDelete` in interface `IColumn`
  Overrides:
    `isMarkedForDelete` in class `Column`

### size

    public int size()

  Specified by:
    `size` in interface `IColumn`
  Overrides:
    `size` in class `Column`

### updateDigest

    public void updateDigest(java.security.MessageDigest digest)

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

### getLocalDeletionTime

    public int getLocalDeletionTime()

  Specified by:
    `getLocalDeletionTime` in interface `IColumn`
  Overrides:
    `getLocalDeletionTime` in class `Column`

### localCopy

    public IColumn localCopy(ColumnFamilyStore cfs)

  Description copied from interface: `IColumn`
  clones the column for the row cache, interning column names and making copies of other underlying byte buffers

  Specified by:
    `localCopy` in interface `IColumn`
  Overrides:
    `localCopy` in class `Column`

### localCopy

    public IColumn localCopy(ColumnFamilyStore cfs,
                             Allocator allocator)

  Description copied from interface: `IColumn`
  clones the column for the memtable, interning column names and making copies of other underlying byte buffers. Unlike the other localCopy, this uses Allocator to allocate values in contiguous memory regions, which helps avoid heap fragmentation.

  Specified by:
    `localCopy` in interface `IColumn`
  Overrides:
    `localCopy` in class `Column`

### getString

    public java.lang.String getString(AbstractType comparator)

  Specified by:
    `getString` in interface `IColumn`
  Overrides:
    `getString` in class `Column`

### getMarkedForDeleteAt

    public long getMarkedForDeleteAt()

  Specified by:
    `getMarkedForDeleteAt` in interface `IColumn`
  Overrides:
    `getMarkedForDeleteAt` in class `Column`

### serializationFlags

    public int serializationFlags()

  Specified by:
    `serializationFlags` in interface `IColumn`
  Overrides:
    `serializationFlags` in class `Column`

### validateFields

    public void validateFields(CFMetaData metadata)
                        throws MarshalException

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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2012 The Apache Software Foundation