public class ArrayBackedSortedColumns extends ColumnFamily
ColumnFamily.Factory<T extends ColumnFamily>
Modifier and Type | Field and Description |
---|---|
static ColumnFamily.Factory<ArrayBackedSortedColumns> |
factory |
metadata, serializer
Modifier | Constructor and Description |
---|---|
protected |
ArrayBackedSortedColumns(CFMetaData metadata,
boolean reversed) |
Modifier and Type | Method and Description |
---|---|
void |
addAll(ColumnFamily other)
Adds all the columns of a given column map to this column map.
|
void |
addColumn(Cell cell)
Adds a cell to this cell map.
|
BatchRemoveIterator<Cell> |
batchRemoveIterator() |
void |
clear()
Clear this column family, removing all columns and deletion info.
|
ColumnFamily |
cloneMe()
Clones the column map.
|
void |
delete(DeletionInfo newInfo) |
void |
delete(DeletionTime delTime) |
protected void |
delete(RangeTombstone tombstone) |
DeletionInfo |
deletionInfo() |
Cell |
getColumn(CellName 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<CellName> |
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<Cell> |
getReverseSortedColumns()
Returns the columns of this column map as a collection.
|
java.util.Collection<Cell> |
getSortedColumns()
Returns the columns of this column map as a collection.
|
boolean |
hasColumns()
Returns whether or not there are any columns present.
|
boolean |
isInsertReversed()
Returns if this map only support inserts in reverse order.
|
java.util.Iterator<Cell> |
iterator(ColumnSlice[] slices)
Returns an iterator over the columns of this map that returns only the matching @param slices.
|
static ArrayBackedSortedColumns |
localCopy(ColumnFamily original,
AbstractAllocator allocator) |
void |
maybeAppendColumn(Cell cell,
DeletionInfo.InOrderTester tester,
int gcBefore)
Adds a cell, assuming that:
- it's non-gc-able (if a tombstone) or not a tombstone
- it has a more recent timestamp than any partition/range tombstone shadowing it
- it sorts *strictly after* the current-last cell in the array.
|
void |
purgeTombstones(int gcBefore)
Purges any tombstones with a local deletion time before gcBefore.
|
java.util.Iterator<Cell> |
reverseIterator(ColumnSlice[] slices)
Returns a reversed iterator over the columns of this map that returns only the matching @param slices.
|
void |
setDeletionInfo(DeletionInfo newInfo) |
addAtom, addColumn, addColumn, addCounter, addTombstone, addTombstone, asMap, cloneMeShallow, cloneMeShallow, cloneMeShallow, dataSize, delete, diff, diff, digest, equals, fromBytes, getColumnStats, getComparator, getType, hashCode, hasOnlyTombstones, id, inOrderDeletionTester, isEmpty, isMarkedForDelete, iterator, liveCQL3RowCount, maxTimestamp, metadata, reverseIterator, toBytes, toString, updateDigest
public static final ColumnFamily.Factory<ArrayBackedSortedColumns> factory
protected ArrayBackedSortedColumns(CFMetaData metadata, boolean reversed)
public static ArrayBackedSortedColumns localCopy(ColumnFamily original, AbstractAllocator allocator)
public ColumnFamily.Factory getFactory()
ColumnFamily
getFactory
in class ColumnFamily
public ColumnFamily cloneMe()
ColumnFamily
cloneMe
in class ColumnFamily
public boolean isInsertReversed()
ColumnFamily
isInsertReversed
in class ColumnFamily
public BatchRemoveIterator<Cell> batchRemoveIterator()
batchRemoveIterator
in class ColumnFamily
public Cell getColumn(CellName name)
ColumnFamily
getColumn
in class ColumnFamily
public void maybeAppendColumn(Cell cell, DeletionInfo.InOrderTester tester, int gcBefore)
maybeAppendColumn
in class ColumnFamily
public void addColumn(Cell cell)
ColumnFamily
addColumn
in class ColumnFamily
public void addAll(ColumnFamily other)
ColumnFamily
for (Cell c : cm)
addColumn(c, ...);
but is potentially faster.addAll
in class ColumnFamily
public java.util.Collection<Cell> getSortedColumns()
ColumnFamily
getSortedColumns
in class ColumnFamily
public java.util.Collection<Cell> getReverseSortedColumns()
ColumnFamily
getReverseSortedColumns
in class ColumnFamily
public int getColumnCount()
ColumnFamily
getColumnCount
in class ColumnFamily
public boolean hasColumns()
ColumnFamily
hasColumns
in class ColumnFamily
public void clear()
ColumnFamily
clear
in class ColumnFamily
public DeletionInfo deletionInfo()
deletionInfo
in class ColumnFamily
public void delete(DeletionTime delTime)
delete
in class ColumnFamily
public void delete(DeletionInfo newInfo)
delete
in class ColumnFamily
protected void delete(RangeTombstone tombstone)
delete
in class ColumnFamily
public void setDeletionInfo(DeletionInfo newInfo)
setDeletionInfo
in class ColumnFamily
public void purgeTombstones(int gcBefore)
purgeTombstones
in class ColumnFamily
gcBefore
- a timestamp (in seconds) before which tombstones should be purgedpublic java.lang.Iterable<CellName> getColumnNames()
ColumnFamily
getColumnNames
in class ColumnFamily
public java.util.Iterator<Cell> iterator(ColumnSlice[] slices)
ColumnFamily
iterator
in class ColumnFamily
public java.util.Iterator<Cell> reverseIterator(ColumnSlice[] slices)
ColumnFamily
reverseIterator
in class ColumnFamily
Copyright © 2017 The Apache Software Foundation