Interface CachedPartition
-
- All Superinterfaces:
IRowCacheEntry
,Partition
- All Known Implementing Classes:
CachedBTreePartition
public interface CachedPartition extends Partition, IRowCacheEntry
A partition stored in the partition cache. Note that in practice, the only implementation of this isCachedBTreePartition
, 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 Modifier and Type Field Description static ISerializer<CachedPartition>
cacheSerializer
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
cachedLiveRows()
The number of rows that were live at the time the partition was cached.Row
lastRow()
The last row in this cached partition (in order words, the row with the biggest clustering that the partition contains).int
rowCount()
The number ofRow
objects in this cached partition.int
rowsWithNonExpiringCells()
The 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 Detail
-
cacheSerializer
static final ISerializer<CachedPartition> cacheSerializer
-
-
Method Detail
-
rowCount
int rowCount()
The number ofRow
objects 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
null
if the partition is empty.
-
-