org.apache.cassandra.db
Interface IColumn

All Superinterfaces:
OnDiskAtom
All Known Implementing Classes:
Column, CounterColumn, CounterUpdateColumn, DeletedColumn, ExpiringColumn, SuperColumn

public interface IColumn
extends OnDiskAtom

TODO: rename


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.apache.cassandra.db.OnDiskAtom
OnDiskAtom.Serializer
 
Field Summary
static int MAX_NAME_LENGTH
           
 
Method Summary
 void addColumn(IColumn column)
           
 void addColumn(IColumn column, Allocator allocator)
           
 int dataSize()
          the size of user-provided data, not including internal overhead
 IColumn diff(IColumn column)
           
 long getMarkedForDeleteAt()
           
 java.lang.String getString(AbstractType<?> comparator)
           
 IColumn getSubColumn(java.nio.ByteBuffer columnName)
           
 java.util.Collection<IColumn> getSubColumns()
           
 boolean hasIrrelevantData(int gcBefore)
           
 boolean isLive()
          For a simple column, live == !isMarkedForDelete.
 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.
 long maxTimestamp()
          For a standard column, this is the same as timestamp().
 long mostRecentLiveChangeAt()
           
 long mostRecentNonGCableChangeAt(int gcbefore)
           
 IColumn reconcile(IColumn column)
           
 IColumn reconcile(IColumn column, Allocator allocator)
           
 int serializationFlags()
           
 long timestamp()
           
 void validateFields(CFMetaData metadata)
           
 java.nio.ByteBuffer value()
           
 
Methods inherited from interface org.apache.cassandra.db.OnDiskAtom
getLocalDeletionTime, minTimestamp, name, serializedSize, serializedSizeForSSTable, updateDigest
 

Field Detail

MAX_NAME_LENGTH

static final int MAX_NAME_LENGTH
See Also:
Constant Field Values
Method Detail

isMarkedForDelete

boolean isMarkedForDelete()
Returns:
true if the column has been deleted (is a tombstone). This depends on comparing the server clock with getLocalDeletionTime, so it can change during a single request if you're not careful.

getMarkedForDeleteAt

long getMarkedForDeleteAt()

mostRecentLiveChangeAt

long mostRecentLiveChangeAt()

mostRecentNonGCableChangeAt

long mostRecentNonGCableChangeAt(int gcbefore)

dataSize

int dataSize()
the size of user-provided data, not including internal overhead


serializationFlags

int serializationFlags()

timestamp

long timestamp()

value

java.nio.ByteBuffer value()

getSubColumns

java.util.Collection<IColumn> getSubColumns()

getSubColumn

IColumn getSubColumn(java.nio.ByteBuffer columnName)

addColumn

void addColumn(IColumn column)

addColumn

void addColumn(IColumn column,
               Allocator allocator)

diff

IColumn diff(IColumn column)

reconcile

IColumn reconcile(IColumn column)

reconcile

IColumn reconcile(IColumn column,
                  Allocator allocator)

getString

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

validateFields

void validateFields(CFMetaData metadata)
                    throws MarshalException
Specified by:
validateFields in interface OnDiskAtom
Throws:
MarshalException

localCopy

IColumn localCopy(ColumnFamilyStore cfs)
clones the column for the row cache, interning column names and making copies of other underlying byte buffers


localCopy

IColumn localCopy(ColumnFamilyStore cfs,
                  Allocator allocator)
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.


isLive

boolean isLive()
For a simple column, live == !isMarkedForDelete. For a supercolumn, live means it has at least one subcolumn whose timestamp is greater than the supercolumn deleted-at time.


maxTimestamp

long maxTimestamp()
For a standard column, this is the same as timestamp(). For a super column, this is the max column timestamp of the sub columns.

Specified by:
maxTimestamp in interface OnDiskAtom

hasIrrelevantData

boolean hasIrrelevantData(int gcBefore)
Returns:
true if the column or any its subcolumns is no longer relevant after @param gcBefore


Copyright © 2013 The Apache Software Foundation