org.apache.cassandra.db

## Class UnsortedColumns

- java.lang.Object
- - org.apache.cassandra.db.ColumnFamily
  - - org.apache.cassandra.db.AbstractThreadUnsafeSortedColumns
    - - org.apache.cassandra.db.UnsortedColumns

All Implemented Interfaces:
  java.lang.Iterable<Column>, IRowCacheEntry

    public class UnsortedColumns
    extends AbstractThreadUnsafeSortedColumns

A ColumnFamily that allows inserting in any order, even unsorted. Operations that require sorting (getSortedColumns) or that cannot be efficient without it (replace, getColumn, etc.) are not supported.

### Nested Class Summary

### Nested classes/interfaces inherited from class org.apache.cassandra.db.ColumnFamily

`ColumnFamily.Factory<T extends ColumnFamily>`

### Field Summary

Fields
`static ColumnFamily.Factory<UnsortedColumns>` `factory`

### Fields inherited from class org.apache.cassandra.db.AbstractThreadUnsafeSortedColumns

`deletionInfo`

### Fields inherited from class org.apache.cassandra.db.ColumnFamily

`metadata, serializer`

### Method Summary

Methods
`void` `addAll(ColumnFamily cm, Allocator allocator, com.google.common.base.Function<Column,Column> transformation)` Adds all the columns of a given column map to this column map.
`void` `addColumn(Column column, Allocator allocator)` Adds a column to this column map.
`void` `clear()` Clear this column family, removing all columns and deletion info.
`ColumnFamily` `cloneMe()` Clones the column map.
`Column` `getColumn(java.nio.ByteBuffer name)` Get a column given its name, returning null if the column is not present.
`int` `getColumnCount()` Returns the number of columns in this map.
`java.lang.Iterable<java.nio.ByteBuffer>` `getColumnNames()` Returns an iterable with the names of columns in this column map in the same order as the underlying columns themselves.
`ColumnFamily.Factory` `getFactory()` Returns the factory used for this ISortedColumns implementation.
`java.util.Collection<Column>` `getReverseSortedColumns()` Returns the columns of this column map as a collection.
`java.util.Collection<Column>` `getSortedColumns()` Returns the columns of this column map as a collection.
`boolean` `isInsertReversed()` Returns if this map only support inserts in reverse order.
`java.util.Iterator<Column>` `iterator()`
`java.util.Iterator<Column>` `iterator(ColumnSlice[] slices)` Returns an iterator over the columns of this map that returns only the matching @param slices.
`boolean` `replace(Column oldColumn, Column newColumn)` Replace oldColumn if present by newColumn.
`java.util.Iterator<Column>` `reverseIterator(ColumnSlice[] slices)` Returns a reversed iterator over the columns of this map that returns only the matching @param slices.

### Methods inherited from class org.apache.cassandra.db.AbstractThreadUnsafeSortedColumns

`delete, delete, delete, deletionInfo, purgeTombstones, setDeletionInfo`

### Methods inherited from class org.apache.cassandra.db.ColumnFamily

`addAll, addAtom, addColumn, addColumn, addColumn, addCounter, addIfRelevant, addTombstone, addTombstone, asMap, cloneMeShallow, cloneMeShallow, dataSize, delete, diff, diff, digest, equals, fromBytes, getColumnStats, getComparator, getType, hashCode, hasIrrelevantData, hasOnlyTombstones, id, inOrderDeletionTester, isEmpty, isMarkedForDelete, maxTimestamp, metadata, resolve, resolve, reverseIterator, toBytes, toString, updateDigest`

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

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

### Field Detail

#### factory

    public static final ColumnFamily.Factory<UnsortedColumns> factory

### Method Detail

#### getFactory

    public ColumnFamily.Factory getFactory()

Description copied from class: `ColumnFamily`
Returns the factory used for this ISortedColumns implementation.

Specified by:
  `getFactory` in class `ColumnFamily`

#### cloneMe

    public ColumnFamily cloneMe()

Description copied from class: `ColumnFamily`
Clones the column map.

Specified by:
  `cloneMe` in class `ColumnFamily`

#### isInsertReversed

    public boolean isInsertReversed()

Description copied from class: `ColumnFamily`
Returns if this map only support inserts in reverse order.

Specified by:
  `isInsertReversed` in class `ColumnFamily`

#### clear

    public void clear()

Description copied from class: `ColumnFamily`
Clear this column family, removing all columns and deletion info.

Specified by:
  `clear` in class `ColumnFamily`

#### addColumn

    public void addColumn(Column column,
                 Allocator allocator)

Description copied from class: `ColumnFamily`
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.

Specified by:
  `addColumn` in class `ColumnFamily`

#### addAll

    public void addAll(ColumnFamily cm,
              Allocator allocator,
              com.google.common.base.Function<Column,Column> transformation)

Description copied from class: `ColumnFamily`
Adds all the columns of a given column map to this column map. This is equivalent to: `for (Column c : cm) addColumn(c, ...);` but is potentially faster.

Specified by:
  `addAll` in class `ColumnFamily`

#### iterator

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

Specified by:
  `iterator` in interface `java.lang.Iterable<Column>`
Overrides:
  `iterator` in class `ColumnFamily`

#### replace

    public boolean replace(Column oldColumn,
                  Column newColumn)

Description copied from class: `ColumnFamily`
Replace oldColumn if present by newColumn. Returns true if oldColumn was present and thus replaced. oldColumn and newColumn should have the same name.

Specified by:
  `replace` in class `ColumnFamily`

#### getColumn

    public Column getColumn(java.nio.ByteBuffer name)

Description copied from class: `ColumnFamily`
Get a column given its name, returning null if the column is not present.

Specified by:
  `getColumn` in class `ColumnFamily`

#### getColumnNames

    public java.lang.Iterable<java.nio.ByteBuffer> getColumnNames()

Description copied from class: `ColumnFamily`
Returns an iterable with the names of columns in this column map in the same order as the underlying columns themselves.

Specified by:
  `getColumnNames` in class `ColumnFamily`

#### getSortedColumns

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

Description copied from class: `ColumnFamily`
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.

Specified by:
  `getSortedColumns` in class `ColumnFamily`

#### getReverseSortedColumns

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

Description copied from class: `ColumnFamily`
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.

Specified by:
  `getReverseSortedColumns` in class `ColumnFamily`

#### getColumnCount

    public int getColumnCount()

Description copied from class: `ColumnFamily`
Returns the number of columns in this map.

Specified by:
  `getColumnCount` in class `ColumnFamily`

#### iterator

    public java.util.Iterator<Column> iterator(ColumnSlice[] slices)

Description copied from class: `ColumnFamily`
Returns an iterator over the columns of this map that returns only the matching @param slices. The provided slices must be in order and must be non-overlapping.

Specified by:
  `iterator` in class `ColumnFamily`

#### reverseIterator

    public java.util.Iterator<Column> reverseIterator(ColumnSlice[] slices)

Description copied from class: `ColumnFamily`
Returns a reversed iterator over the columns of this map that returns only the matching @param slices. The provided slices must be in reversed order and must be non-overlapping.

Specified by:
  `reverseIterator` in class `ColumnFamily`