org.apache.cassandra.db
Class ColumnFamily

java.lang.Object
  extended by org.apache.cassandra.db.ColumnFamily
All Implemented Interfaces:
java.lang.Iterable<IColumn>, IColumnContainer, IIterableColumns

public class ColumnFamily
extends java.lang.Object
implements IColumnContainer, IIterableColumns


Constructor Summary
ColumnFamily(ColumnFamilyType type, AbstractType comparator, AbstractType subcolumnComparator, java.lang.Integer cfid)
           
 
Method Summary
 void addAll(ColumnFamily cf)
           
 void addColumn(java.nio.ByteBuffer superColumnName, Column column)
           
 void addColumn(IColumn column)
           
 void addColumn(QueryPath path, java.nio.ByteBuffer value, long timestamp)
           
 void addColumn(QueryPath path, java.nio.ByteBuffer value, long timestamp, int timeToLive)
           
 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()
           
static ColumnFamily create(CFMetaData cfm)
           
static ColumnFamily create(java.lang.Integer cfId)
           
static ColumnFamily create(java.lang.String tableName, java.lang.String cfName)
           
 void delete(ColumnFamily cf2)
           
 void delete(int localtime, long timestamp)
          Deprecated. 
 ColumnFamily diff(ColumnFamily cfComposite)
           
static ColumnFamily diff(ColumnFamily cf1, ColumnFamily cf2)
           
static java.nio.ByteBuffer digest(ColumnFamily cf)
           
 boolean equals(java.lang.Object o)
           
 IColumn getColumn(java.nio.ByteBuffer name)
           
 ColumnFamilyType getColumnFamilyType()
           
 java.util.SortedSet<java.nio.ByteBuffer> getColumnNames()
           
 ICompactSerializer2<IColumn> getColumnSerializer()
          FIXME: Gross.
 java.util.Map<java.nio.ByteBuffer,IColumn> getColumnsMap()
           
 AbstractType getComparator()
           
static AbstractType getComparatorFor(java.lang.String table, java.lang.String columnFamilyName, java.nio.ByteBuffer superColumnName)
           
 int getEstimatedColumnCount()
           
 int getLocalDeletionTime()
           
 long getMarkedForDeleteAt()
           
 java.util.Collection<IColumn> getReverseSortedColumns()
           
 java.util.Collection<IColumn> getSortedColumns()
           
 AbstractType getSubComparator()
           
 int hashCode()
           
 java.lang.Integer id()
           
 boolean isMarkedForDelete()
           
 boolean isSuper()
           
 java.util.Iterator<IColumn> iterator()
           
 CFMetaData metadata()
           
 void remove(java.nio.ByteBuffer columnName)
           
 void resolve(ColumnFamily cf)
           
static ColumnFamily resolve(ColumnFamily cf1, ColumnFamily cf2)
           
static ColumnFamilySerializer serializer()
           
 java.lang.String toString()
           
 void updateDigest(java.security.MessageDigest digest)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ColumnFamily

public ColumnFamily(ColumnFamilyType type,
                    AbstractType comparator,
                    AbstractType subcolumnComparator,
                    java.lang.Integer cfid)
Method Detail

serializer

public static ColumnFamilySerializer serializer()

create

public static ColumnFamily create(java.lang.Integer cfId)

create

public static ColumnFamily create(java.lang.String tableName,
                                  java.lang.String cfName)

create

public static ColumnFamily create(CFMetaData cfm)

cloneMeShallow

public ColumnFamily cloneMeShallow()

getSubComparator

public AbstractType getSubComparator()

getColumnFamilyType

public ColumnFamilyType getColumnFamilyType()

cloneMe

public ColumnFamily cloneMe()

id

public java.lang.Integer id()

metadata

public CFMetaData metadata()
Returns:
The CFMetaData for this row, or null if the column family was dropped.

addAll

public void addAll(ColumnFamily cf)

getColumnSerializer

public ICompactSerializer2<IColumn> getColumnSerializer()
FIXME: Gross.


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)

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

addColumn

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

getColumn

public IColumn getColumn(java.nio.ByteBuffer name)

getColumnNames

public java.util.SortedSet<java.nio.ByteBuffer> getColumnNames()

getSortedColumns

public java.util.Collection<IColumn> getSortedColumns()

getReverseSortedColumns

public java.util.Collection<IColumn> getReverseSortedColumns()

getColumnsMap

public java.util.Map<java.nio.ByteBuffer,IColumn> getColumnsMap()

remove

public void remove(java.nio.ByteBuffer columnName)

delete

@Deprecated
public void delete(int localtime,
                              long timestamp)
Deprecated. 


delete

public void delete(ColumnFamily cf2)

isMarkedForDelete

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

diff

public ColumnFamily diff(ColumnFamily cfComposite)

getComparator

public AbstractType getComparator()
Specified by:
getComparator in interface IColumnContainer
Specified by:
getComparator in interface IIterableColumns

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)

getMarkedForDeleteAt

public long getMarkedForDeleteAt()
Specified by:
getMarkedForDeleteAt in interface IColumnContainer

getLocalDeletionTime

public int getLocalDeletionTime()

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 static ColumnFamily resolve(ColumnFamily cf1,
                                   ColumnFamily cf2)

resolve

public void resolve(ColumnFamily cf)

getEstimatedColumnCount

public int getEstimatedColumnCount()
Specified by:
getEstimatedColumnCount in interface IIterableColumns

iterator

public java.util.Iterator<IColumn> iterator()
Specified by:
iterator in interface java.lang.Iterable<IColumn>


Copyright © 2010 The Apache Software Foundation