Interface CachedPartition
- All Superinterfaces:
IRowCacheEntry,Partition
- All Known Implementing Classes:
CachedBTreePartition
A partition stored in the partition cache.
Note that in practice, the only implementation of this is
CachedBTreePartition,
we keep this interface mainly to make it clear what we need from partition in the cache
(that we don't otherwise)-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionintThe number of rows that were live at the time the partition was cached.lastRow()The last row in this cached partition (in order words, the row with the biggest clustering that the partition contains).introwCount()The number ofRowobjects in this cached partition.intThe number of rows in this cached partition that have at least one non-expiring non-deleted cell.Methods inherited from interface org.apache.cassandra.db.partitions.Partition
columns, getRow, hasRows, isEmpty, metadata, partitionKey, partitionLevelDeletion, stats, unfilteredIterator, unfilteredIterator, unfilteredIterator
-
Field Details
-
cacheSerializer
-
-
Method Details
-
rowCount
int rowCount()The number ofRowobjects in this cached partition. Please note that this is not the number of live rows since some of the row may only contains deleted (or expired) information.- Returns:
- the number of row in the partition.
-
cachedLiveRows
int cachedLiveRows()The number of rows that were live at the time the partition was cached. SeeColumnFamilyStore.isFilterFullyCoveredBy(org.apache.cassandra.db.filter.ClusteringIndexFilter, org.apache.cassandra.db.filter.DataLimits, org.apache.cassandra.db.partitions.CachedPartition, long, boolean)to see why we need this.- Returns:
- the number of rows in this partition that were live at the time the partition was cached (this can be different from the number of live rows now due to expiring cells).
-
rowsWithNonExpiringCells
int rowsWithNonExpiringCells()The number of rows in this cached partition that have at least one non-expiring non-deleted cell. Note that this is generally not a very meaningful number, but this is used byDataLimits.hasEnoughLiveData(org.apache.cassandra.db.partitions.CachedPartition, long, boolean, boolean)as an optimization.- Returns:
- the number of row that have at least one non-expiring non-deleted cell.
-
lastRow
Row lastRow()The last row in this cached partition (in order words, the row with the biggest clustering that the partition contains).- Returns:
- the last row of the partition, or
nullif the partition is empty.
-