org.apache.cassandra.db
Class ColumnFamily
java.lang.Object
org.apache.cassandra.db.AbstractColumnContainer
org.apache.cassandra.db.ColumnFamily
- All Implemented Interfaces:
- java.lang.Iterable<IColumn>, IColumnContainer, IIterableColumns
public class ColumnFamily
- extends AbstractColumnContainer
Method Summary |
void |
addColumn(java.nio.ByteBuffer superColumnName,
Column column)
|
void |
addColumn(QueryPath path,
java.nio.ByteBuffer value,
long timestamp)
|
void |
addColumn(QueryPath path,
java.nio.ByteBuffer value,
long timestamp,
int timeToLive)
|
void |
addCounter(QueryPath path,
long value)
|
void |
addTombstone(java.nio.ByteBuffer name,
int localDeletionTime,
long timestamp)
|
void |
addTombstone(QueryPath path,
java.nio.ByteBuffer localDeletionTime,
long timestamp)
|
void |
addTombstone(QueryPath path,
int localDeletionTime,
long timestamp)
|
void |
clear()
|
ColumnFamily |
cloneMe()
|
ColumnFamily |
cloneMeShallow()
|
ColumnFamily |
cloneMeShallow(ISortedColumns.Factory factory,
boolean reversedInsertOrder)
|
static ColumnFamily |
create(CFMetaData cfm)
|
static ColumnFamily |
create(CFMetaData cfm,
ISortedColumns.Factory factory)
|
static ColumnFamily |
create(CFMetaData cfm,
ISortedColumns.Factory factory,
boolean reversedInsertOrder)
|
static ColumnFamily |
create(java.lang.Integer cfId)
|
static ColumnFamily |
create(java.lang.Integer cfId,
ISortedColumns.Factory factory)
|
static ColumnFamily |
create(java.lang.String tableName,
java.lang.String cfName)
|
ColumnFamily |
diff(ColumnFamily cfComposite)
|
static ColumnFamily |
diff(ColumnFamily cf1,
ColumnFamily cf2)
|
static java.nio.ByteBuffer |
digest(ColumnFamily cf)
|
boolean |
equals(java.lang.Object o)
|
IColumnSerializer |
getColumnSerializer()
FIXME: shouldn't need to hold a reference to a serializer; worse, for super cfs,
it will be a _unique_ serializer object per row |
static AbstractType |
getComparatorFor(java.lang.String table,
java.lang.String columnFamilyName,
java.nio.ByteBuffer superColumnName)
|
AbstractType |
getSubComparator()
|
ColumnFamilyType |
getType()
|
int |
hashCode()
|
java.lang.Integer |
id()
|
boolean |
isSuper()
|
long |
maxTimestamp()
|
CFMetaData |
metadata()
|
void |
resolve(ColumnFamily cf)
|
void |
resolve(ColumnFamily cf,
Allocator allocator)
|
long |
serializedSize()
|
long |
serializedSizeForSSTable()
|
static ColumnFamilySerializer |
serializer()
|
java.lang.String |
toString()
|
void |
updateDigest(java.security.MessageDigest digest)
|
void |
validateColumnFields()
Goes over all columns and check the fields are valid (as far as we can
tell). |
Methods inherited from class org.apache.cassandra.db.AbstractColumnContainer |
addAll, addColumn, addColumn, delete, delete, getColumn, getColumnCount, getColumnNames, getComparator, getEstimatedColumnCount, getLiveColumnCount, getLocalDeletionTime, getMarkedForDeleteAt, getReverseSortedColumns, getSortedColumns, hasExpiredTombstones, isEmpty, isMarkedForDelete, iterator, maybeResetDeletionTimes, remove, replace, retainAll |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
serializer
public static ColumnFamilySerializer serializer()
create
public static ColumnFamily create(java.lang.Integer cfId)
create
public static ColumnFamily create(java.lang.Integer cfId,
ISortedColumns.Factory factory)
create
public static ColumnFamily create(java.lang.String tableName,
java.lang.String cfName)
create
public static ColumnFamily create(CFMetaData cfm)
create
public static ColumnFamily create(CFMetaData cfm,
ISortedColumns.Factory factory)
create
public static ColumnFamily create(CFMetaData cfm,
ISortedColumns.Factory factory,
boolean reversedInsertOrder)
cloneMeShallow
public ColumnFamily cloneMeShallow(ISortedColumns.Factory factory,
boolean reversedInsertOrder)
cloneMeShallow
public ColumnFamily cloneMeShallow()
getSubComparator
public AbstractType getSubComparator()
getType
public ColumnFamilyType getType()
cloneMe
public ColumnFamily cloneMe()
id
public java.lang.Integer id()
metadata
public CFMetaData metadata()
- Returns:
- The CFMetaData for this row
getColumnSerializer
public IColumnSerializer getColumnSerializer()
- FIXME: shouldn't need to hold a reference to a serializer; worse, for super cfs,
it will be a _unique_ serializer object per row
isSuper
public boolean isSuper()
addColumn
public void addColumn(QueryPath path,
java.nio.ByteBuffer value,
long timestamp)
addColumn
public void addColumn(QueryPath path,
java.nio.ByteBuffer value,
long timestamp,
int timeToLive)
addCounter
public void addCounter(QueryPath path,
long value)
addTombstone
public void addTombstone(QueryPath path,
java.nio.ByteBuffer localDeletionTime,
long timestamp)
addTombstone
public void addTombstone(QueryPath path,
int localDeletionTime,
long timestamp)
addTombstone
public void addTombstone(java.nio.ByteBuffer name,
int localDeletionTime,
long timestamp)
addColumn
public void addColumn(java.nio.ByteBuffer superColumnName,
Column column)
clear
public void clear()
diff
public ColumnFamily diff(ColumnFamily cfComposite)
maxTimestamp
public long maxTimestamp()
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in class java.lang.Object
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
digest
public static java.nio.ByteBuffer digest(ColumnFamily cf)
updateDigest
public void updateDigest(java.security.MessageDigest digest)
getComparatorFor
public static AbstractType getComparatorFor(java.lang.String table,
java.lang.String columnFamilyName,
java.nio.ByteBuffer superColumnName)
diff
public static ColumnFamily diff(ColumnFamily cf1,
ColumnFamily cf2)
resolve
public void resolve(ColumnFamily cf)
resolve
public void resolve(ColumnFamily cf,
Allocator allocator)
serializedSize
public long serializedSize()
serializedSizeForSSTable
public long serializedSizeForSSTable()
validateColumnFields
public void validateColumnFields()
throws MarshalException
- Goes over all columns and check the fields are valid (as far as we can
tell).
This is used to detect corruption after deserialization.
- Throws:
MarshalException
Copyright © 2011 The Apache Software Foundation