Interface Partition
-
- All Known Subinterfaces:
CachedPartition
- All Known Implementing Classes:
AbstractBTreePartition
,AtomicBTreePartition
,CachedBTreePartition
,FilteredPartition
,ImmutableBTreePartition
,PartitionUpdate
public interface Partition
In-memory representation of a Partition. Note that most of the storage engine works through iterators (UnfilteredPartitionIterator) to avoid "materializing" a full partition/query response in memory as much as possible, and so Partition objects should be use as sparingly as possible. There is a couple of cases where we do need to represent partition in-memory (memtables and row cache).
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description RegularAndStaticColumns
columns()
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.boolean
isEmpty()
Whether the partition object has no informations at all, including any deletion informations.TableMetadata
metadata()
DecoratedKey
partitionKey()
DeletionTime
partitionLevelDeletion()
EncodingStats
stats()
UnfilteredRowIterator
unfilteredIterator()
Returns an UnfilteredRowIterator over all the rows/RT contained by this partition.UnfilteredRowIterator
unfilteredIterator(ColumnFilter columns, 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 columns, Slices slices, boolean reversed)
Returns an UnfilteredRowIterator over the rows/RT contained by this partition selected by the provided slices.
-
-
-
Method Detail
-
metadata
TableMetadata metadata()
-
partitionKey
DecoratedKey partitionKey()
-
partitionLevelDeletion
DeletionTime partitionLevelDeletion()
-
columns
RegularAndStaticColumns columns()
-
stats
EncodingStats stats()
-
isEmpty
boolean isEmpty()
Whether the partition object has no informations at all, including any deletion informations.
-
hasRows
boolean hasRows()
Whether the partition object has rows. This may be false but partition still be non-empty if it has a deletion.
-
getRow
@Nullable Row getRow(Clustering<?> clustering)
Returns the row corresponding to the provided clustering, or null if there is not such row.- Parameters:
clustering
- clustering key to search- Returns:
- row corresponding to the clustering, it's either null or non-empty row.
-
unfilteredIterator
UnfilteredRowIterator unfilteredIterator()
Returns an UnfilteredRowIterator over all the rows/RT contained by this partition.
-
unfilteredIterator
UnfilteredRowIterator unfilteredIterator(ColumnFilter columns, Slices slices, boolean reversed)
Returns an UnfilteredRowIterator over the rows/RT contained by this partition selected by the provided slices.
-
unfilteredIterator
UnfilteredRowIterator unfilteredIterator(ColumnFilter columns, java.util.NavigableSet<Clustering<?>> clusteringsInQueryOrder, boolean reversed)
Returns an UnfilteredRowIterator over the rows/RT contained by this partition selected by the provided clusterings.
-
-