Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cassandra.db
Interface ISortedColumns

All Superinterfaces:
  IIterableColumns, java.lang.Iterable<IColumn>

All Known Implementing Classes:
  AbstractThreadUnsafeSortedColumns, ArrayBackedSortedColumns, AtomicSortedColumns, ThreadSafeSortedColumns, TreeMapBackedSortedColumns

    public interface ISortedColumns

extends IIterableColumns

A sorted map of columns. This represents the backing map of a colum family. Whether the implementation is thread safe or not is left to the implementing classes.

Nested Class Summary
`static class` | `ISortedColumns.DeletionInfo`
`static interface` | `ISortedColumns.Factory`

Method Summary
`void` | `addAll(ISortedColumns cm, Allocator allocator, com.google.common.base.Function<IColumn,IColumn> transformation)` Adds the columns without necessarily computing the size delta
`long` | `addAllWithSizeDelta(ISortedColumns cm, Allocator allocator, com.google.common.base.Function<IColumn,IColumn> transformation)` Adds all the columns of a given column map to this column map.
`void` | `addColumn(IColumn column, Allocator allocator)` Adds a column to this column map.
`void` | `clear()` Clear this column map, removing all columns.
`ISortedColumns` | `cloneMe()` Shallow cloning of the column map.
`void` | `delete(ISortedColumns.DeletionInfo info)`
`IColumn` | `getColumn(java.nio.ByteBuffer name)` Get a column given its name, returning null if the column is not present.
`java.util.SortedSet<java.nio.ByteBuffer>` | `getColumnNames()` Returns a set with the names of columns in this column map.
`ISortedColumns.DeletionInfo` | `getDeletionInfo()`
`ISortedColumns.Factory` | `getFactory()` Returns the factory used for this ISortedColumns implementation.
`java.util.Collection<IColumn>` | `getReverseSortedColumns()` Returns the columns of this column map as a collection.
`java.util.Collection<IColumn>` | `getSortedColumns()` Returns the columns of this column map as a collection.
`boolean` | `isEmpty()` Returns true if this map is empty, false otherwise.
`boolean` | `isInsertReversed()` Returns if this map only support inserts in reverse order.
`java.util.Iterator<IColumn>` | `iterator(java.nio.ByteBuffer start)` Returns an iterator over the columns of this map starting from the first column whose name is equal or greater than @param start.
`void` | `maybeResetDeletionTimes(int gcBefore)`
`void` | `removeColumn(java.nio.ByteBuffer name)` Remove if present a column by name.
`boolean` | `replace(IColumn oldColumn, IColumn newColumn)` Replace oldColumn if present by newColumn.
`void` | `retainAll(ISortedColumns columns)`
`java.util.Iterator<IColumn>` | `reverseIterator()` Returns an iterator that iterates over the columns of this map in reverse order.
`java.util.Iterator<IColumn>` | `reverseIterator(java.nio.ByteBuffer start)` Returns a reversed iterator over the columns of this map starting from the last column whose name is equal or lesser than @param start.
`int` | `size()` Returns the number of columns in this map.

Methods inherited from interface org.apache.cassandra.io.util.IIterableColumns
`getComparator, getEstimatedColumnCount`

Methods inherited from interface java.lang.Iterable
`iterator`

Method Detail

### cloneMe

    ISortedColumns cloneMe()

  Shallow cloning of the column map.

### getFactory

    ISortedColumns.Factory getFactory()

  Returns the factory used for this ISortedColumns implementation.

### getDeletionInfo

    ISortedColumns.DeletionInfo getDeletionInfo()

### delete

    void delete(ISortedColumns.DeletionInfo info)

### maybeResetDeletionTimes

    void maybeResetDeletionTimes(int gcBefore)

### retainAll

    void retainAll(ISortedColumns columns)

### addColumn

    void addColumn(IColumn column,
                   Allocator allocator)

  Adds a column to this column map. If a column with the same name is already present in the map, it will be replaced by the newly added column.

### addAllWithSizeDelta

    long addAllWithSizeDelta(ISortedColumns cm,
                             Allocator allocator,
                             com.google.common.base.Function<IColumn,IColumn> transformation)

  Adds all the columns of a given column map to this column map. This is equivalent to: `for (Column c : cm) add(c);` but is potentially faster.

  Returns:
    the difference in size seen after merging the given columns

### addAll

    void addAll(ISortedColumns cm,
                Allocator allocator,
                com.google.common.base.Function<IColumn,IColumn> transformation)

  Adds the columns without necessarily computing the size delta

### replace

    boolean replace(IColumn oldColumn,
                    IColumn newColumn)

  Replace oldColumn if present by newColumn. Returns true if oldColumn was present and thus replaced. oldColumn and newColumn should have the same name.

### removeColumn

    void removeColumn(java.nio.ByteBuffer name)

  Remove if present a column by name.

### clear

    void clear()

  Clear this column map, removing all columns.

### getColumn

    IColumn getColumn(java.nio.ByteBuffer name)

  Get a column given its name, returning null if the column is not present.

### getColumnNames

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

  Returns a set with the names of columns in this column map. The resulting set is sorted and the order is the one of the columns in this column map.

### getSortedColumns

    java.util.Collection<IColumn> getSortedColumns()

  Returns the columns of this column map as a collection. The columns in the returned collection should be sorted as the columns in this map.

### getReverseSortedColumns

    java.util.Collection<IColumn> getReverseSortedColumns()

  Returns the columns of this column map as a collection. The columns in the returned collection should be sorted in reverse order of the columns in this map.

### size

    int size()

  Returns the number of columns in this map.

### isEmpty

    boolean isEmpty()

  Returns true if this map is empty, false otherwise.

### reverseIterator

    java.util.Iterator<IColumn> reverseIterator()

  Returns an iterator that iterates over the columns of this map in reverse order.

### iterator

    java.util.Iterator<IColumn> iterator(java.nio.ByteBuffer start)

  Returns an iterator over the columns of this map starting from the first column whose name is equal or greater than @param start.

### reverseIterator

    java.util.Iterator<IColumn> reverseIterator(java.nio.ByteBuffer start)

  Returns a reversed iterator over the columns of this map starting from the last column whose name is equal or lesser than @param start.

### isInsertReversed

    boolean isInsertReversed()

  Returns if this map only support inserts in reverse order.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2013 The Apache Software Foundation