public interface ReplicaMovementStrategy
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.Integer,java.util.SortedSet<ExecutionTask>> |
applyStrategy(java.util.Set<ExecutionTask> replicaMovementTasks,
org.apache.kafka.common.Cluster cluster)
Determine the execution order for replica movement tasks based on a customized strategy.
|
ReplicaMovementStrategy |
chain(ReplicaMovementStrategy strategy)
Chain with another replica movement strategy to create a composite strategy.The returned strategy should use a combined rule
of two strategies in determining the task execution order.
|
java.lang.String |
name()
Get the name of this strategy.
|
java.util.Comparator<ExecutionTask> |
taskComparator(org.apache.kafka.common.Cluster cluster)
Generate a comparator for replica movement task which incorporate the strategy to apply.
|
java.util.Map<java.lang.Integer,java.util.SortedSet<ExecutionTask>> applyStrategy(java.util.Set<ExecutionTask> replicaMovementTasks, org.apache.kafka.common.Cluster cluster)
replicaMovementTasks
- The replica movement tasks to be executed.cluster
- The current cluster state.ReplicaMovementStrategy chain(ReplicaMovementStrategy strategy)
strategy
- The other replica movement strategy.java.util.Comparator<ExecutionTask> taskComparator(org.apache.kafka.common.Cluster cluster)
cluster
- The current cluster state.java.lang.String name()