|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.cassandra.db.Column
public class Column
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 java.nio.ByteBuffer |
name
|
protected long |
timestamp
|
protected java.nio.ByteBuffer |
value
|
| Fields inherited from interface org.apache.cassandra.db.IColumn |
|---|
MAX_NAME_LENGTH |
| Constructor Summary | |
|---|---|
Column(java.nio.ByteBuffer name,
java.nio.ByteBuffer value)
|
|
Column(java.nio.ByteBuffer name,
java.nio.ByteBuffer value,
long timestamp)
|
|
| Method Summary | |
|---|---|
void |
addColumn(IColumn column)
|
void |
addColumn(IColumn column,
Allocator allocator)
|
IColumn |
diff(IColumn column)
|
boolean |
equals(java.lang.Object o)
|
int |
getLocalDeletionTime()
|
long |
getMarkedForDeleteAt()
|
java.lang.String |
getString(AbstractType comparator)
|
Column |
getSubColumn(java.nio.ByteBuffer columnName)
|
java.util.Collection<IColumn> |
getSubColumns()
|
boolean |
hasExpiredTombstones(int gcBefore)
|
int |
hashCode()
|
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 |
minTimestamp()
For a standard column, this is the same as timestamp(). |
long |
mostRecentLiveChangeAt()
|
java.nio.ByteBuffer |
name()
|
IColumn |
reconcile(IColumn column)
|
IColumn |
reconcile(IColumn column,
Allocator allocator)
|
int |
serializationFlags()
|
int |
serializedSize()
|
static ColumnSerializer |
serializer()
|
int |
size()
|
long |
timestamp()
|
void |
updateDigest(java.security.MessageDigest digest)
|
void |
validateFields(CFMetaData metadata)
|
protected void |
validateName(CFMetaData metadata)
|
java.nio.ByteBuffer |
value()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.nio.ByteBuffer name
protected final java.nio.ByteBuffer value
protected final long timestamp
| Constructor Detail |
|---|
public Column(java.nio.ByteBuffer name,
java.nio.ByteBuffer value)
public Column(java.nio.ByteBuffer name,
java.nio.ByteBuffer value,
long timestamp)
| Method Detail |
|---|
public static ColumnSerializer serializer()
public java.nio.ByteBuffer name()
name in interface IColumnpublic Column getSubColumn(java.nio.ByteBuffer columnName)
getSubColumn in interface IColumnpublic java.nio.ByteBuffer value()
value in interface IColumnpublic java.util.Collection<IColumn> getSubColumns()
getSubColumns in interface IColumnpublic long timestamp()
timestamp in interface IColumnpublic long maxTimestamp()
IColumn
maxTimestamp in interface IColumnpublic long minTimestamp()
IColumn
minTimestamp in interface IColumnpublic boolean isMarkedForDelete()
isMarkedForDelete in interface IColumnpublic long getMarkedForDeleteAt()
getMarkedForDeleteAt in interface IColumnpublic long mostRecentLiveChangeAt()
mostRecentLiveChangeAt in interface IColumnpublic int size()
size in interface IColumnpublic int serializedSize()
serializedSize in interface IColumnpublic int serializationFlags()
serializationFlags in interface IColumnpublic void addColumn(IColumn column)
addColumn in interface IColumn
public void addColumn(IColumn column,
Allocator allocator)
addColumn in interface IColumnpublic IColumn diff(IColumn column)
diff in interface IColumnpublic void updateDigest(java.security.MessageDigest digest)
updateDigest in interface IColumnpublic int getLocalDeletionTime()
getLocalDeletionTime in interface IColumnpublic IColumn reconcile(IColumn column)
reconcile in interface IColumn
public IColumn reconcile(IColumn column,
Allocator allocator)
reconcile in interface IColumnpublic boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Objectpublic IColumn localCopy(ColumnFamilyStore cfs)
IColumn
localCopy in interface IColumn
public IColumn localCopy(ColumnFamilyStore cfs,
Allocator allocator)
IColumn
localCopy in interface IColumnpublic java.lang.String getString(AbstractType comparator)
getString in interface IColumnpublic boolean isLive()
IColumn
isLive in interface IColumn
protected void validateName(CFMetaData metadata)
throws MarshalException
MarshalException
public void validateFields(CFMetaData metadata)
throws MarshalException
validateFields in interface IColumnMarshalExceptionpublic boolean hasExpiredTombstones(int gcBefore)
hasExpiredTombstones in interface IColumn
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||