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 classAbstractBTreePartition.Holder
-
Field Summary
Fields Modifier and Type Field Description protected static AbstractBTreePartition.HolderEMPTYstatic longHOLDER_UNSHARED_HEAP_SIZEprotected DecoratedKeypartitionKey
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractBTreePartition(DecoratedKey partitionKey)
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected static AbstractBTreePartition.Holderbuild(RowIterator rows, DeletionInfo deletion, boolean buildEncodingStats)protected static AbstractBTreePartition.Holderbuild(UnfilteredRowIterator iterator, int initialRowCapacity)protected static AbstractBTreePartition.Holderbuild(UnfilteredRowIterator iterator, int initialRowCapacity, boolean ordered)protected abstract booleancanHaveShadowedData()RegularAndStaticColumnscolumns()DeletionInfodeletionInfo()booleanequals(java.lang.Object obj)RowgetRow(Clustering<?> clustering)Returns the row corresponding to the provided clustering, or null if there is not such row.booleanhasRows()Whether the partition object has rows.protected abstract AbstractBTreePartition.Holderholder()booleanisEmpty()Whether the partition object has no informations at all, including any deletion informations.java.util.Iterator<Row>iterator()RowlastRow()abstract TableMetadatametadata()DecoratedKeypartitionKey()DeletionTimepartitionLevelDeletion()introwCount()RowstaticRow()EncodingStatsstats()java.lang.StringtoString()java.lang.StringtoString(boolean includeFullDetails)UnfilteredRowIteratorunfilteredIterator()Returns an UnfilteredRowIterator over all the rows/RT contained by this partition.UnfilteredRowIteratorunfilteredIterator(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.UnfilteredRowIteratorunfilteredIterator(ColumnFilter selection, Slices slices, boolean reversed)Returns an UnfilteredRowIterator over the rows/RT contained by this partition selected by the provided slices.UnfilteredRowIteratorunfilteredIterator(AbstractBTreePartition.Holder current, ColumnFilter selection, Slices slices, boolean reversed)static AbstractBTreePartition.HolderunsafeConstructHolder(RegularAndStaticColumns columns, java.lang.Object[] tree, DeletionInfo deletionInfo, Row staticRow, EncodingStats stats)static AbstractBTreePartition.HolderunsafeGetEmptyHolder()
-
-
-
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:PartitionWhether the partition object has no informations at all, including any deletion informations.
-
hasRows
public boolean hasRows()
Description copied from interface:PartitionWhether 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:
partitionKeyin interfacePartition
-
partitionLevelDeletion
public DeletionTime partitionLevelDeletion()
- Specified by:
partitionLevelDeletionin interfacePartition
-
columns
public RegularAndStaticColumns columns()
-
stats
public EncodingStats stats()
-
getRow
public Row getRow(Clustering<?> clustering)
Description copied from interface:PartitionReturns 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:PartitionReturns an UnfilteredRowIterator over the rows/RT contained by this partition selected by the provided clusterings.- Specified by:
unfilteredIteratorin interfacePartition
-
unfilteredIterator
public UnfilteredRowIterator unfilteredIterator()
Description copied from interface:PartitionReturns an UnfilteredRowIterator over all the rows/RT contained by this partition.- Specified by:
unfilteredIteratorin interfacePartition
-
unfilteredIterator
public UnfilteredRowIterator unfilteredIterator(ColumnFilter selection, Slices slices, boolean reversed)
Description copied from interface:PartitionReturns an UnfilteredRowIterator over the rows/RT contained by this partition selected by the provided slices.- Specified by:
unfilteredIteratorin 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:
toStringin classjava.lang.Object
-
toString
public java.lang.String toString(boolean includeFullDetails)
-
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equalsin classjava.lang.Object
-
rowCount
public int rowCount()
-
iterator
public java.util.Iterator<Row> iterator()
- Specified by:
iteratorin 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)
-
-