Class RepairAssignmentIterator
java.lang.Object
org.apache.cassandra.repair.autorepair.RepairAssignmentIterator
- All Implemented Interfaces:
Iterator<KeyspaceRepairAssignments>
public abstract class RepairAssignmentIterator
extends Object
implements Iterator<KeyspaceRepairAssignments>
Convenience
Iterator implementation to assist implementations of
IAutoRepairTokenRangeSplitter.getRepairAssignments(boolean, List) by passing KeyspaceRepairPlan
to a custom next(int, KeyspaceRepairPlan) method in priority order.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanhasNext()next()protected abstract KeyspaceRepairAssignmentsnext(int priority, KeyspaceRepairPlan repairPlan) Invoked bynext()with the nextKeyspaceRepairPlanfor the given priority.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Constructor Details
-
RepairAssignmentIterator
-
-
Method Details
-
hasNext
public boolean hasNext()- Specified by:
hasNextin interfaceIterator<KeyspaceRepairAssignments>
-
next
- Specified by:
nextin interfaceIterator<KeyspaceRepairAssignments>
-
next
Invoked bynext()with the nextKeyspaceRepairPlanfor the given priority.- Parameters:
priority- current priority being processed.repairPlan- the next keyspace repair plan to process- Returns:
- assignments for the given keyspace at this priority. Should never return null, if one desires to
short-circuit the iterator, override
hasNext().
-