## org.apache.cassandra.db
Class AbstractColumnContainer

    java.lang.Object
      org.apache.cassandra.db.AbstractColumnContainer

All Implemented Interfaces:
  java.lang.Iterable<IColumn>, IColumnContainer, IIterableColumns

Direct Known Subclasses:
  ColumnFamily, SuperColumn

    public abstract class AbstractColumnContainer

extends java.lang.Object
implements IColumnContainer, IIterableColumns

Nested Class Summary
`protected static class` `AbstractColumnContainer.DeletionInfo`

Field Summary
`protected ISortedColumns` `columns`
`protected java.util.concurrent.atomic.AtomicReference<AbstractColumnContainer.DeletionInfo>` `deletionInfo`

Constructor Summary
`protected` `AbstractColumnContainer(ISortedColumns columns)`

Method Summary
`void` `addAll(AbstractColumnContainer cc, Allocator allocator)` We need to go through each column in the column container and resolve it before adding
`void` `addColumn(IColumn column)`
`void` `addColumn(IColumn column, Allocator allocator)`
`void` `delete(AbstractColumnContainer cc2)`
`void` `delete(int localtime, long timestamp)` Deprecated.
`IColumn` `getColumn(java.nio.ByteBuffer name)`
`int` `getColumnCount()`
`java.util.SortedSet<java.nio.ByteBuffer>` `getColumnNames()`
`AbstractType` `getComparator()`
`int` `getEstimatedColumnCount()`
`int` `getLiveColumnCount()`
`int` `getLocalDeletionTime()`
`long` `getMarkedForDeleteAt()`
`java.util.Collection<IColumn>` `getReverseSortedColumns()`
`java.util.Collection<IColumn>` `getSortedColumns()`
`boolean` `hasIrrelevantData(int gcBefore)`
`boolean` `isEmpty()`
`boolean` `isMarkedForDelete()`
`java.util.Iterator<IColumn>` `iterator()`
`void` `maybeResetDeletionTimes(int gcBefore)` Drops expired row-level tombstones.
`void` `remove(java.nio.ByteBuffer columnName)`
`boolean` `replace(IColumn oldColumn, IColumn newColumn)` Replace oldColumn if represent by newColumn.
`void` `retainAll(AbstractColumnContainer container)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### deletionInfo

    protected final java.util.concurrent.atomic.AtomicReference<AbstractColumnContainer.DeletionInfo> deletionInfo

### columns

    protected final ISortedColumns columns

Constructor Detail

### AbstractColumnContainer

    protected AbstractColumnContainer(ISortedColumns columns)

Method Detail

### delete

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

  Deprecated.

### delete

    public void delete(AbstractColumnContainer cc2)

### isMarkedForDelete

    public boolean isMarkedForDelete()

  Specified by:
    `isMarkedForDelete` in interface `IColumnContainer`

### getMarkedForDeleteAt

    public long getMarkedForDeleteAt()

  Specified by:
    `getMarkedForDeleteAt` in interface `IColumnContainer`

### getLocalDeletionTime

    public int getLocalDeletionTime()

### getComparator

    public AbstractType getComparator()

  Specified by:
    `getComparator` in interface `IColumnContainer`
  Specified by:
    `getComparator` in interface `IIterableColumns`

### maybeResetDeletionTimes

    public void maybeResetDeletionTimes(int gcBefore)

  Drops expired row-level tombstones. Normally, these are dropped once the row no longer exists, but if new columns are inserted into the row post-deletion, they can keep the row tombstone alive indefinitely, with non-intuitive results. See https://issues.apache.org/jira/browse/CASSANDRA-2317

### addAll

    public void addAll(AbstractColumnContainer cc,
                       Allocator allocator)

  We need to go through each column in the column container and resolve it before adding

### addColumn

    public void addColumn(IColumn column)

  Specified by:
    `addColumn` in interface `IColumnContainer`

### addColumn

    public void addColumn(IColumn column,
                          Allocator allocator)

  Specified by:
    `addColumn` in interface `IColumnContainer`

### getColumn

    public IColumn getColumn(java.nio.ByteBuffer name)

### replace

    public boolean replace(IColumn oldColumn,
                           IColumn newColumn)

  Description copied from interface: `IColumnContainer`
  Replace oldColumn if represent by newColumn. Returns true if oldColumn was present (and thus replaced) oldColumn and newColumn should have the same name. !NOTE! This should only be used if you know this is what you need. To add a column such that it use the usual column resolution rules in a thread safe manner, use addColumn.

  Specified by:
    `replace` in interface `IColumnContainer`

### getColumnNames

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

### getSortedColumns

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

  Specified by:
    `getSortedColumns` in interface `IColumnContainer`

### getReverseSortedColumns

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

### remove

    public void remove(java.nio.ByteBuffer columnName)

  Specified by:
    `remove` in interface `IColumnContainer`

### retainAll

    public void retainAll(AbstractColumnContainer container)

### getColumnCount

    public int getColumnCount()

### isEmpty

    public boolean isEmpty()

### getEstimatedColumnCount

    public int getEstimatedColumnCount()

  Specified by:
    `getEstimatedColumnCount` in interface `IIterableColumns`

### getLiveColumnCount

    public int getLiveColumnCount()

### iterator

    public java.util.Iterator<IColumn> iterator()

  Specified by:
    `iterator` in interface `java.lang.Iterable<IColumn>`

### hasIrrelevantData

    public boolean hasIrrelevantData(int gcBefore)

  Specified by:
    `hasIrrelevantData` in interface `IColumnContainer`

Copyright © 2012 The Apache Software Foundation