|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cassandra.db.AbstractThreadUnsafeSortedColumns
org.apache.cassandra.db.ArrayBackedSortedColumns
public class ArrayBackedSortedColumns
A ISortedColumns backed by an ArrayList. This implementation is not synchronized and should only be used when thread-safety is not required. This implementation makes sense when the main operations performed are iterating over the map and adding columns (especially if insertion is in sorted order).
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.cassandra.db.ISortedColumns |
---|
ISortedColumns.DeletionInfo, ISortedColumns.Factory |
Field Summary | |
---|---|
static ISortedColumns.Factory |
factory
|
Method Summary | |
---|---|
protected void |
addAllColumns(ISortedColumns cm,
Allocator allocator,
com.google.common.base.Function<IColumn,IColumn> transformation)
|
void |
addColumn(IColumn column,
Allocator allocator)
AddColumn throws an exception if the column added does not sort after the last column in the map. |
void |
clear()
Clear this column map, removing all columns. |
ISortedColumns |
cloneMe()
Shallow cloning of the column map. |
static ISortedColumns.Factory |
factory()
|
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. |
AbstractType<?> |
getComparator()
|
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 |
isInsertReversed()
Returns if this map only support inserts in reverse order. |
java.util.Iterator<IColumn> |
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. |
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. |
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 class org.apache.cassandra.db.AbstractThreadUnsafeSortedColumns |
---|
addAll, delete, getDeletionInfo, getEstimatedColumnCount, isEmpty, maybeResetDeletionTimes, retainAll |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cassandra.db.ISortedColumns |
---|
addAll, delete, getDeletionInfo, isEmpty, maybeResetDeletionTimes, retainAll |
Methods inherited from interface org.apache.cassandra.io.util.IIterableColumns |
---|
getEstimatedColumnCount |
Field Detail |
---|
public static final ISortedColumns.Factory factory
Method Detail |
---|
public static ISortedColumns.Factory factory()
public ISortedColumns.Factory getFactory()
ISortedColumns
getFactory
in interface ISortedColumns
public AbstractType<?> getComparator()
getComparator
in interface IIterableColumns
public ISortedColumns cloneMe()
ISortedColumns
cloneMe
in interface ISortedColumns
public boolean isInsertReversed()
ISortedColumns
isInsertReversed
in interface ISortedColumns
public IColumn getColumn(java.nio.ByteBuffer name)
ISortedColumns
getColumn
in interface ISortedColumns
public void addColumn(IColumn column, Allocator allocator)
addColumn
in interface ISortedColumns
protected void addAllColumns(ISortedColumns cm, Allocator allocator, com.google.common.base.Function<IColumn,IColumn> transformation)
addAllColumns
in class AbstractThreadUnsafeSortedColumns
public boolean replace(IColumn oldColumn, IColumn newColumn)
ISortedColumns
replace
in interface ISortedColumns
public java.util.Collection<IColumn> getSortedColumns()
ISortedColumns
getSortedColumns
in interface ISortedColumns
public java.util.Collection<IColumn> getReverseSortedColumns()
ISortedColumns
getReverseSortedColumns
in interface ISortedColumns
public void removeColumn(java.nio.ByteBuffer name)
ISortedColumns
removeColumn
in interface ISortedColumns
public int size()
ISortedColumns
size
in interface ISortedColumns
public void clear()
ISortedColumns
clear
in interface ISortedColumns
public java.util.SortedSet<java.nio.ByteBuffer> getColumnNames()
ISortedColumns
getColumnNames
in interface ISortedColumns
public java.util.Iterator<IColumn> iterator()
iterator
in interface java.lang.Iterable<IColumn>
public java.util.Iterator<IColumn> reverseIterator()
ISortedColumns
reverseIterator
in interface ISortedColumns
public java.util.Iterator<IColumn> iterator(java.nio.ByteBuffer start)
ISortedColumns
iterator
in interface ISortedColumns
public java.util.Iterator<IColumn> reverseIterator(java.nio.ByteBuffer start)
ISortedColumns
reverseIterator
in interface ISortedColumns
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |