|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<IColumn>
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.Factory |
| Field Summary | |
|---|---|
static ISortedColumns.Factory |
factory
|
| Fields inherited from class java.util.AbstractList |
|---|
modCount |
| Method Summary | |
|---|---|
void |
addAll(ISortedColumns cm,
Allocator allocator)
Adds all the columns of a given column map to this column map. |
void |
addColumn(IColumn column,
Allocator allocator)
AddColumn throws an exception if the column added does not sort after the last column in the map. |
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()
|
int |
getEstimatedColumnCount()
|
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()
|
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. |
| Methods inherited from class java.util.ArrayList |
|---|
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, get, indexOf, isEmpty, lastIndexOf, remove, remove, removeRange, set, size, toArray, toArray, trimToSize |
| Methods inherited from class java.util.AbstractList |
|---|
equals, hashCode, listIterator, listIterator, subList |
| Methods inherited from class java.util.AbstractCollection |
|---|
containsAll, removeAll, retainAll, toString |
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.apache.cassandra.db.ISortedColumns |
|---|
clear, isEmpty, size |
| Methods inherited from interface java.util.List |
|---|
containsAll, equals, hashCode, listIterator, listIterator, removeAll, retainAll, subList |
| Field Detail |
|---|
public static final ISortedColumns.Factory factory
| Method Detail |
|---|
public static ISortedColumns.Factory factory()
public ISortedColumns.Factory getFactory()
ISortedColumns
getFactory in interface ISortedColumnspublic AbstractType<?> getComparator()
getComparator in interface IIterableColumnspublic ISortedColumns cloneMe()
ISortedColumns
cloneMe in interface ISortedColumnspublic boolean isInsertReversed()
ISortedColumns
isInsertReversed in interface ISortedColumnspublic IColumn getColumn(java.nio.ByteBuffer name)
ISortedColumns
getColumn in interface ISortedColumns
public void addColumn(IColumn column,
Allocator allocator)
addColumn in interface ISortedColumns
public void addAll(ISortedColumns cm,
Allocator allocator)
ISortedColumns
for (Column c : cm)
add(c);
but is potentially faster.
addAll in interface ISortedColumns
public boolean replace(IColumn oldColumn,
IColumn newColumn)
ISortedColumns
replace in interface ISortedColumnspublic java.util.Collection<IColumn> getSortedColumns()
ISortedColumns
getSortedColumns in interface ISortedColumnspublic java.util.Collection<IColumn> getReverseSortedColumns()
ISortedColumns
getReverseSortedColumns in interface ISortedColumnspublic void removeColumn(java.nio.ByteBuffer name)
ISortedColumns
removeColumn in interface ISortedColumnspublic java.util.SortedSet<java.nio.ByteBuffer> getColumnNames()
ISortedColumns
getColumnNames in interface ISortedColumnspublic int getEstimatedColumnCount()
getEstimatedColumnCount in interface IIterableColumnspublic java.util.Iterator<IColumn> iterator()
iterator in interface java.lang.Iterable<IColumn>iterator in interface java.util.Collection<IColumn>iterator in interface java.util.List<IColumn>iterator in class java.util.AbstractList<IColumn>public java.util.Iterator<IColumn> reverseIterator()
ISortedColumns
reverseIterator in interface ISortedColumns
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||