org.apache.cassandra.db
Class Column

java.lang.Object
  extended by org.apache.cassandra.db.Column
All Implemented Interfaces:
IColumn
Direct Known Subclasses:
DeletedColumn, ExpiringColumn

public class Column
extends java.lang.Object
implements IColumn

Column is immutable, which prevents all kinds of confusion in a multithreaded environment. (TODO: look at making SuperColumn immutable too. This is trickier but is probably doable with something like PCollections -- http://code.google.com


Field Summary
protected  IClock clock
           
protected  byte[] name
           
protected  byte[] value
           
 
Fields inherited from interface org.apache.cassandra.db.IColumn
MAX_NAME_LENGTH
 
Constructor Summary
Column(byte[] name, byte[] value)
           
Column(byte[] name, byte[] value, IClock clock)
           
 
Method Summary
 void addColumn(IColumn column)
           
 IClock clock()
           
 IClock.ClockRelationship comparePriority(Column o)
           
 IColumn diff(IColumn column)
           
 boolean equals(java.lang.Object o)
           
 int getLocalDeletionTime()
           
 IClock getMarkedForDeleteAt()
           
 java.lang.String getString(AbstractType comparator)
           
 Column getSubColumn(byte[] columnName)
           
 java.util.Collection<IColumn> getSubColumns()
           
 int hashCode()
           
 boolean isMarkedForDelete()
           
 IClock mostRecentLiveChangeAt()
           
 byte[] name()
           
 int serializedSize()
           
static ColumnSerializer serializer(ClockType clockType)
           
 int size()
           
 void updateDigest(java.security.MessageDigest digest)
           
 byte[] value()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name

protected final byte[] name

value

protected final byte[] value

clock

protected final IClock clock
Constructor Detail

Column

public Column(byte[] name,
              byte[] value)

Column

public Column(byte[] name,
              byte[] value,
              IClock clock)
Method Detail

serializer

public static ColumnSerializer serializer(ClockType clockType)

name

public byte[] name()
Specified by:
name in interface IColumn

getSubColumn

public Column getSubColumn(byte[] columnName)
Specified by:
getSubColumn in interface IColumn

value

public byte[] value()
Specified by:
value in interface IColumn

getSubColumns

public java.util.Collection<IColumn> getSubColumns()
Specified by:
getSubColumns in interface IColumn

clock

public IClock clock()
Specified by:
clock in interface IColumn

isMarkedForDelete

public boolean isMarkedForDelete()
Specified by:
isMarkedForDelete in interface IColumn

getMarkedForDeleteAt

public IClock getMarkedForDeleteAt()
Specified by:
getMarkedForDeleteAt in interface IColumn

mostRecentLiveChangeAt

public IClock mostRecentLiveChangeAt()
Specified by:
mostRecentLiveChangeAt in interface IColumn

size

public int size()
Specified by:
size in interface IColumn

serializedSize

public int serializedSize()
Specified by:
serializedSize in interface IColumn

addColumn

public void addColumn(IColumn column)
Specified by:
addColumn in interface IColumn

diff

public IColumn diff(IColumn column)
Specified by:
diff in interface IColumn

updateDigest

public void updateDigest(java.security.MessageDigest digest)
Specified by:
updateDigest in interface IColumn

getLocalDeletionTime

public int getLocalDeletionTime()
Specified by:
getLocalDeletionTime in interface IColumn

comparePriority

public IClock.ClockRelationship comparePriority(Column o)

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

getString

public java.lang.String getString(AbstractType comparator)
Specified by:
getString in interface IColumn


Copyright © 2010 The Apache Software Foundation