Interface ExecutionPlan
-
- All Superinterfaces:
com.tangosol.io.ExternalizableLite,Serializable
- All Known Implementing Classes:
MutableExecutionPlan
public interface ExecutionPlan extends com.tangosol.io.ExternalizableLiteDefines proposedExecutionPlan.Actions for assigning aTaskto zero or moreExecutors for execution.- Since:
- 21.12
- Author:
- bo
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classExecutionPlan.ActionA proposedExecutionPlan.Actionfor anExecutor.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description intcount(Predicate<? super ExecutionPlan.Action> predicate)Determines the number of aExecutors whoseExecutionPlan.Actions satisfy the specifiedPredicatein theExecutionPlan.ExecutionPlan.ActiongetAction(String sId)Obtains the proposedExecutionPlan.Actionfor the specifiedExecutor.Iterator<String>getIds()Obtains the unique identities ofExecutors withExecutionPlan.Actions.intgetPendingRecoveryCount()Determines the current number of effective assignments of aTasktoExecutors that failed (for some reason), which could be re-assigned as aExecutionPlan.Action.RECOVERaction.booleanisSatisfied()Determines if theExecutionPlanwill satisfy theExecutionStrategyconditions, including assigning the required number ofExecutors to aTaskfor execution.booleanoptimize()Optimizes theExecutionPlan, returning if there where any changes caused by the optimization.booleansetAction(String sId, ExecutionPlan.Action action)Sets the proposedExecutionPlan.Actionfor the specifiedExecutor.intsize()Obtains the number ofExecutionPlan.Actions for theExecutionPlan.
-
-
-
Method Detail
-
getAction
ExecutionPlan.Action getAction(String sId)
Obtains the proposedExecutionPlan.Actionfor the specifiedExecutor.- Parameters:
sId- theExecutorid- Returns:
- an
ExecutionPlan.Actionornullif noExecutionPlan.Actionhas been defined
-
setAction
boolean setAction(String sId, ExecutionPlan.Action action)
Sets the proposedExecutionPlan.Actionfor the specifiedExecutor.- Parameters:
sId- theExecutoridaction- theExecutionPlan.Actionto set to- Returns:
- a boolean to indicate if the
ExecutionPlanwas changed as a result of setting an action
-
size
int size()
Obtains the number ofExecutionPlan.Actions for theExecutionPlan.- Returns:
- the number of
ExecutionPlan.Actions
-
getIds
Iterator<String> getIds()
Obtains the unique identities ofExecutors withExecutionPlan.Actions.- Returns:
- the
Executoridentities.
-
count
int count(Predicate<? super ExecutionPlan.Action> predicate)
Determines the number of aExecutors whoseExecutionPlan.Actions satisfy the specifiedPredicatein theExecutionPlan.- Parameters:
predicate- thePredicateto evaluate theExecutionPlan.Action- Returns:
- the number of
Executors that satisfy the specifiedPredicate
-
isSatisfied
boolean isSatisfied()
Determines if theExecutionPlanwill satisfy theExecutionStrategyconditions, including assigning the required number ofExecutors to aTaskfor execution.- Returns:
truewhen theExecutionPlansatisfies theExecutionStrategythat defined itfalseotherwise
-
getPendingRecoveryCount
int getPendingRecoveryCount()
Determines the current number of effective assignments of aTasktoExecutors that failed (for some reason), which could be re-assigned as aExecutionPlan.Action.RECOVERaction.- Returns:
- the pending recovery count
-
optimize
boolean optimize()
Optimizes theExecutionPlan, returning if there where any changes caused by the optimization.- Returns:
trueif theExecutionPlanwas changed during optimization,falseotherwise
-
-