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>
-
-
Field Summary
Fields Modifier and Type Field Description 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 BTreePartitionData
build(RowIterator rows, DeletionInfo deletion, boolean buildEncodingStats)
protected static BTreePartitionData
build(UnfilteredRowIterator iterator, int initialRowCapacity)
protected static BTreePartitionData
build(UnfilteredRowIterator iterator, int initialRowCapacity, boolean ordered)
protected abstract boolean
canHaveShadowedData()
RegularAndStaticColumns
columns()
DeletionInfo
deletionInfo()
boolean
equals(java.lang.Object obj)
Row
getRow(Clustering<?> clustering)
Returns the row corresponding to the provided clustering, or null if there is not such row.boolean
hasRows()
Whether the partition object has rows.protected abstract BTreePartitionData
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()
java.lang.String
toString(boolean includeFullDetails)
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(BTreePartitionData current, ColumnFilter selection, Slices slices, boolean reversed)
-
-
-
Field Detail
-
partitionKey
protected final DecoratedKey partitionKey
-
-
Constructor Detail
-
AbstractBTreePartition
protected AbstractBTreePartition(DecoratedKey partitionKey)
-
-
Method Detail
-
holder
protected abstract BTreePartitionData 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()
Description copied from interface:Partition
Whether the partition object has rows. This may be false but partition still be non-empty if it has a deletion.
-
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(BTreePartitionData current, ColumnFilter selection, Slices slices, boolean reversed)
-
build
protected static BTreePartitionData build(UnfilteredRowIterator iterator, int initialRowCapacity)
-
build
protected static BTreePartitionData build(UnfilteredRowIterator iterator, int initialRowCapacity, boolean ordered)
-
build
protected static BTreePartitionData build(RowIterator rows, DeletionInfo deletion, boolean buildEncodingStats)
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
toString
public java.lang.String toString(boolean includeFullDetails)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
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()
-
-