Class AbstractBTreePartition
- java.lang.Object
-
- org.apache.cassandra.db.partitions.AbstractBTreePartition
-
- Direct Known Subclasses:
AtomicBTreePartition
,ImmutableBTreePartition
,PartitionUpdate
public abstract class AbstractBTreePartition extends java.lang.Object implements Partition, java.lang.Iterable<Row>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
AbstractBTreePartition.Holder
-
Field Summary
Fields Modifier and Type Field Description protected static AbstractBTreePartition.Holder
EMPTY
static long
HOLDER_UNSHARED_HEAP_SIZE
protected DecoratedKey
partitionKey
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractBTreePartition(DecoratedKey partitionKey)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static AbstractBTreePartition.Holder
build(RowIterator rows, DeletionInfo deletion, boolean buildEncodingStats)
protected static AbstractBTreePartition.Holder
build(UnfilteredRowIterator iterator, int initialRowCapacity)
protected static AbstractBTreePartition.Holder
build(UnfilteredRowIterator iterator, int initialRowCapacity, boolean ordered)
protected abstract boolean
canHaveShadowedData()
RegularAndStaticColumns
columns()
DeletionInfo
deletionInfo()
Row
getRow(Clustering<?> clustering)
Returns the row corresponding to the provided clustering, or null if there is not such row.boolean
hasRows()
protected abstract AbstractBTreePartition.Holder
holder()
boolean
isEmpty()
Whether the partition object has no informations at all, including any deletion informations.java.util.Iterator<Row>
iterator()
Row
lastRow()
abstract TableMetadata
metadata()
DecoratedKey
partitionKey()
DeletionTime
partitionLevelDeletion()
int
rowCount()
Row
staticRow()
EncodingStats
stats()
java.lang.String
toString()
UnfilteredRowIterator
unfilteredIterator()
Returns an UnfilteredRowIterator over all the rows/RT contained by this partition.UnfilteredRowIterator
unfilteredIterator(ColumnFilter selection, java.util.NavigableSet<Clustering<?>> clusteringsInQueryOrder, boolean reversed)
Returns an UnfilteredRowIterator over the rows/RT contained by this partition selected by the provided clusterings.UnfilteredRowIterator
unfilteredIterator(ColumnFilter selection, Slices slices, boolean reversed)
Returns an UnfilteredRowIterator over the rows/RT contained by this partition selected by the provided slices.UnfilteredRowIterator
unfilteredIterator(AbstractBTreePartition.Holder current, ColumnFilter selection, Slices slices, boolean reversed)
static AbstractBTreePartition.Holder
unsafeConstructHolder(RegularAndStaticColumns columns, java.lang.Object[] tree, DeletionInfo deletionInfo, Row staticRow, EncodingStats stats)
static AbstractBTreePartition.Holder
unsafeGetEmptyHolder()
-
-
-
Field Detail
-
EMPTY
protected static final AbstractBTreePartition.Holder EMPTY
-
HOLDER_UNSHARED_HEAP_SIZE
public static final long HOLDER_UNSHARED_HEAP_SIZE
-
partitionKey
protected final DecoratedKey partitionKey
-
-
Constructor Detail
-
AbstractBTreePartition
protected AbstractBTreePartition(DecoratedKey partitionKey)
-
-
Method Detail
-
holder
protected abstract AbstractBTreePartition.Holder holder()
-
canHaveShadowedData
protected abstract boolean canHaveShadowedData()
-
deletionInfo
public DeletionInfo deletionInfo()
-
staticRow
public Row staticRow()
-
isEmpty
public boolean isEmpty()
Description copied from interface:Partition
Whether the partition object has no informations at all, including any deletion informations.
-
hasRows
public boolean hasRows()
-
metadata
public abstract TableMetadata metadata()
-
partitionKey
public DecoratedKey partitionKey()
- Specified by:
partitionKey
in interfacePartition
-
partitionLevelDeletion
public DeletionTime partitionLevelDeletion()
- Specified by:
partitionLevelDeletion
in interfacePartition
-
columns
public RegularAndStaticColumns columns()
-
stats
public EncodingStats stats()
-
getRow
public Row getRow(Clustering<?> clustering)
Description copied from interface:Partition
Returns the row corresponding to the provided clustering, or null if there is not such row.
-
unfilteredIterator
public UnfilteredRowIterator unfilteredIterator(ColumnFilter selection, java.util.NavigableSet<Clustering<?>> clusteringsInQueryOrder, boolean reversed)
Description copied from interface:Partition
Returns an UnfilteredRowIterator over the rows/RT contained by this partition selected by the provided clusterings.- Specified by:
unfilteredIterator
in interfacePartition
-
unfilteredIterator
public UnfilteredRowIterator unfilteredIterator()
Description copied from interface:Partition
Returns an UnfilteredRowIterator over all the rows/RT contained by this partition.- Specified by:
unfilteredIterator
in interfacePartition
-
unfilteredIterator
public UnfilteredRowIterator unfilteredIterator(ColumnFilter selection, Slices slices, boolean reversed)
Description copied from interface:Partition
Returns an UnfilteredRowIterator over the rows/RT contained by this partition selected by the provided slices.- Specified by:
unfilteredIterator
in interfacePartition
-
unfilteredIterator
public UnfilteredRowIterator unfilteredIterator(AbstractBTreePartition.Holder current, ColumnFilter selection, Slices slices, boolean reversed)
-
build
protected static AbstractBTreePartition.Holder build(UnfilteredRowIterator iterator, int initialRowCapacity)
-
build
protected static AbstractBTreePartition.Holder build(UnfilteredRowIterator iterator, int initialRowCapacity, boolean ordered)
-
build
protected static AbstractBTreePartition.Holder build(RowIterator rows, DeletionInfo deletion, boolean buildEncodingStats)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
rowCount
public int rowCount()
-
iterator
public java.util.Iterator<Row> iterator()
- Specified by:
iterator
in interfacejava.lang.Iterable<Row>
-
lastRow
public Row lastRow()
-
unsafeGetEmptyHolder
public static AbstractBTreePartition.Holder unsafeGetEmptyHolder()
-
unsafeConstructHolder
public static AbstractBTreePartition.Holder unsafeConstructHolder(RegularAndStaticColumns columns, java.lang.Object[] tree, DeletionInfo deletionInfo, Row staticRow, EncodingStats stats)
-
-