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>, IMeasurableMemory, IRowCacheEntry, IColumnContainer, IIterableColumns

      public class ColumnFamily
      extends AbstractColumnContainer
      implements IRowCacheEntry

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static ColumnFamilySerializer` | `serializer`

    - ### Fields inherited from class org.apache.cassandra.db.AbstractColumnContainer

      `columns`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ColumnFamily(CFMetaData cfm, ISortedColumns map)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `addAllWithSCCopy(ColumnFamily cf, Allocator allocator)` Same as addAll() but do a cloneMe of SuperColumn if necessary to avoid keeping references to the structure (see #3957).
    `void` | `addAtom(OnDiskAtom atom)`
    `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.String tableName, java.lang.String cfName)`
    `static ColumnFamily` | `create(java.util.UUID cfId)`
    `static ColumnFamily` | `create(java.util.UUID cfId, ISortedColumns.Factory factory)`
    `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()`
    `ColumnStats` | `getColumnStats()`
    `static AbstractType<?>` | `getComparatorFor(java.lang.String table, java.lang.String columnFamilyName, java.nio.ByteBuffer superColumnName)`
    `OnDiskAtom.Serializer` | `getOnDiskSerializer()`
    `AbstractType<?>` | `getSubComparator()`
    `ColumnFamilyType` | `getType()`
    `int` | `hashCode()`
    `java.util.UUID` | `id()`
    `boolean` | `isSuper()`
    `long` | `maxTimestamp()`
    `long` | `memorySize()`
    `CFMetaData` | `metadata()`
    `void` | `resolve(ColumnFamily cf)`
    `void` | `resolve(ColumnFamily cf, Allocator allocator)`
    `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, addAll, addAllWithSizeDelta, addColumn, addColumn, delete, delete, delete, delete, deletionInfo, getColumn, getColumnCount, getColumnNames, getComparator, getEstimatedColumnCount, getReverseSortedColumns, getSortedColumns, hasIrrelevantData, hasOnlyTombstones, isEmpty, isMarkedForDelete, iterator, iterator, maybeResetDeletionTimes, remove, replace, retainAll, reverseIterator, setDeletionInfo`

    - ### Methods inherited from class java.lang.Object

      `clone, finalize, getClass, notify, notifyAll, wait, wait, wait`

- - ### Field Detail

    - #### serializer

          public static final ColumnFamilySerializer serializer

  - ### Constructor Detail

    - #### ColumnFamily

          protected ColumnFamily(CFMetaData cfm,
                      ISortedColumns map)

  - ### Method Detail

    - #### create

          public static ColumnFamily create(java.util.UUID cfId)

    - #### create

          public static ColumnFamily create(java.util.UUID 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.util.UUID id()

    - #### metadata

          public CFMetaData metadata()

      Returns:
        The CFMetaData for this row

    - #### getColumnSerializer

          public IColumnSerializer getColumnSerializer()

    - #### getOnDiskSerializer

          public OnDiskAtom.Serializer getOnDiskSerializer()

    - #### isSuper

          public boolean isSuper()

    - #### addAllWithSCCopy

          public void addAllWithSCCopy(ColumnFamily cf,
                              Allocator allocator)

      Same as addAll() but do a cloneMe of SuperColumn if necessary to avoid keeping references to the structure (see #3957).

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

    - #### addAtom

          public void addAtom(OnDiskAtom atom)

    - #### clear

          public void clear()

    - #### diff

          public ColumnFamily diff(ColumnFamily cfComposite)

    - #### memorySize

          public long memorySize()

      Specified by:
        `memorySize` in interface `IMeasurableMemory`

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

    - #### 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`

    - #### getColumnStats

          public ColumnStats getColumnStats()

Copyright © 2014 The Apache Software Foundation