Package org.apache.cassandra.db.filter
Class DataLimits.Counter
- java.lang.Object
-
- org.apache.cassandra.db.transform.Transformation<I>
-
- org.apache.cassandra.db.transform.StoppingTransformation<BaseRowIterator<?>>
-
- org.apache.cassandra.db.filter.DataLimits.Counter
-
- Enclosing class:
- DataLimits
public abstract static class DataLimits.Counter extends StoppingTransformation<BaseRowIterator<?>>
-
-
Field Summary
Fields Modifier and Type Field Description protected booleanassumeLiveDataprotected booleanenforceLimitsprotected intnowInSec-
Fields inherited from class org.apache.cassandra.db.transform.StoppingTransformation
partitions, rows
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedCounter(int nowInSec, boolean assumeLiveData, boolean enforceStrictLiveness)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description PartitionIteratorapplyTo(PartitionIterator partitions)UnfilteredPartitionIteratorapplyTo(UnfilteredPartitionIterator partitions)RowIteratorapplyTo(RowIterator partition)UnfilteredRowIteratorapplyTo(UnfilteredRowIterator partition)protected abstract voidapplyToPartition(DecoratedKey partitionKey, Row staticRow)protected BaseRowIterator<?>applyToPartition(BaseRowIterator<?> partition)Applied to any rows iterator (partition) we encounter in a partitions iteratorprotected voidattachTo(BasePartitions partitions)protected voidattachTo(BaseRows rows)abstract intcounted()The number of results counted.abstract intcountedInCurrentPartition()abstract booleanisDone()abstract booleanisDoneForPartition()protected booleanisLive(Row row)voidonClose()Run on the close of any (logical) partitions iterator this function was applied to We stipulate logical, because if applied to a transformed iterator the lifetime of the iterator object may be longer than the lifetime of the "logical" iterator it was applied to; if the iterator is refilled with MoreContents, for instance, the iterator may outlive this functionDataLimits.CounteronlyCount()abstract introwsCounted()The number of rows counted.abstract introwsCountedInCurrentPartition()The number of rows counted in the current partition.-
Methods inherited from class org.apache.cassandra.db.transform.StoppingTransformation
onPartitionClose, stop, stopInPartition
-
Methods inherited from class org.apache.cassandra.db.transform.Transformation
apply, apply, apply, apply, applyToDeletion, applyToMarker, applyToPartitionColumns, applyToPartitionKey, applyToRow, applyToStatic
-
-
-
-
Method Detail
-
onlyCount
public DataLimits.Counter onlyCount()
-
applyTo
public PartitionIterator applyTo(PartitionIterator partitions)
-
applyTo
public UnfilteredPartitionIterator applyTo(UnfilteredPartitionIterator partitions)
-
applyTo
public UnfilteredRowIterator applyTo(UnfilteredRowIterator partition)
-
applyTo
public RowIterator applyTo(RowIterator partition)
-
counted
public abstract int counted()
The number of results counted.Note that the definition of "results" should be the same that for
DataLimits.count().- Returns:
- the number of results counted.
-
countedInCurrentPartition
public abstract int countedInCurrentPartition()
-
rowsCounted
public abstract int rowsCounted()
The number of rows counted.- Returns:
- the number of rows counted.
-
rowsCountedInCurrentPartition
public abstract int rowsCountedInCurrentPartition()
The number of rows counted in the current partition.- Returns:
- the number of rows counted in the current partition.
-
isDone
public abstract boolean isDone()
-
isDoneForPartition
public abstract boolean isDoneForPartition()
-
isLive
protected boolean isLive(Row row)
-
applyToPartition
protected BaseRowIterator<?> applyToPartition(BaseRowIterator<?> partition)
Description copied from class:TransformationApplied to any rows iterator (partition) we encounter in a partitions iterator- Overrides:
applyToPartitionin classTransformation<BaseRowIterator<?>>
-
applyToPartition
protected abstract void applyToPartition(DecoratedKey partitionKey, Row staticRow)
-
attachTo
protected void attachTo(BasePartitions partitions)
- Overrides:
attachToin classStoppingTransformation<BaseRowIterator<?>>
-
attachTo
protected void attachTo(BaseRows rows)
- Overrides:
attachToin classStoppingTransformation<BaseRowIterator<?>>
-
onClose
public void onClose()
Description copied from class:TransformationRun on the close of any (logical) partitions iterator this function was applied to We stipulate logical, because if applied to a transformed iterator the lifetime of the iterator object may be longer than the lifetime of the "logical" iterator it was applied to; if the iterator is refilled with MoreContents, for instance, the iterator may outlive this function- Overrides:
onClosein classStoppingTransformation<BaseRowIterator<?>>
-
-