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
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final booleanprotected booleanprotected final longFields inherited from class org.apache.cassandra.db.transform.StoppingTransformation
partitions, rows -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedCounter(long nowInSec, boolean assumeLiveData, boolean enforceStrictLiveness) -
Method Summary
Modifier and TypeMethodDescriptionapplyTo(PartitionIterator partitions) applyTo(UnfilteredPartitionIterator partitions) applyTo(RowIterator partition) applyTo(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 voidabstract intcounted()The number of results counted.abstract intabstract booleanisDone()abstract booleanprotected booleanvoidonClose()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 functionabstract intThe number of rows counted.abstract intThe number of rows counted in the current partition.Methods inherited from class org.apache.cassandra.db.transform.StoppingTransformation
onPartitionClose, stop, stopInPartitionMethods inherited from class org.apache.cassandra.db.transform.Transformation
apply, apply, apply, apply, applyToDeletion, applyToMarker, applyToPartitionColumns, applyToPartitionKey, applyToRow, applyToStatic
-
Field Details
-
nowInSec
protected final long nowInSec -
assumeLiveData
protected final boolean assumeLiveData -
enforceLimits
protected boolean enforceLimits
-
-
Constructor Details
-
Counter
protected Counter(long nowInSec, boolean assumeLiveData, boolean enforceStrictLiveness)
-
-
Method Details
-
onlyCount
-
applyTo
-
applyTo
-
applyTo
-
applyTo
-
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
-
applyToPartition
Description copied from class:TransformationApplied to any rows iterator (partition) we encounter in a partitions iterator- Overrides:
applyToPartitionin classTransformation<BaseRowIterator<?>>
-
applyToPartition
-
attachTo
- Overrides:
attachToin classStoppingTransformation<BaseRowIterator<?>>
-
attachTo
- 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<?>>
-