Class StandardExecutionStrategy
- java.lang.Object
-
- com.oracle.coherence.concurrent.executor.StandardExecutionStrategy
-
- All Implemented Interfaces:
ExecutionStrategy,com.tangosol.io.ExternalizableLite,com.tangosol.io.pof.PortableObject,Serializable
public class StandardExecutionStrategy extends Object implements ExecutionStrategy, com.tangosol.io.pof.PortableObject
AnExecutionStrategythat createsExecutionPlans for executing aTaskon a number of availableExecutors that satisfy a specifiedRemote.Predicate.- Since:
- 21.12
- Author:
- bo
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.oracle.coherence.concurrent.executor.ExecutionStrategy
ExecutionStrategy.EvaluationRationale
-
-
Field Summary
Fields Modifier and Type Field Description protected intm_cDesiredExecutorsprotected booleanm_fPerformConcurrentlyShould theExecutionPlanschedule theTaskfor execution concurrently or sequentially?protected com.tangosol.util.function.Remote.Predicate<? super TaskExecutorService.ExecutorInfo>m_predicate
-
Constructor Summary
Constructors Constructor Description StandardExecutionStrategy()Constructs aStandardExecutionStrategy(required for serialization).StandardExecutionStrategy(int cDesiredExecutors, com.tangosol.util.function.Remote.Predicate<? super TaskExecutorService.ExecutorInfo> predicate, boolean fConcurrentExecution)Constructs aStandardExecutionStrategy.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExecutionPlananalyze(ExecutionPlan currentPlan, Map<String,? extends TaskExecutorService.ExecutorInfo> mapExecutorInfo, EnumSet<ExecutionStrategy.EvaluationRationale> rationales)Analyzes the currentExecutionPlanfor aTask, together with theTaskExecutorService.ExecutorInfoto produce a newExecutionPlan.voidreadExternal(com.tangosol.io.pof.PofReader in)voidreadExternal(DataInput in)voidwriteExternal(com.tangosol.io.pof.PofWriter out)voidwriteExternal(DataOutput out)
-
-
-
Field Detail
-
m_cDesiredExecutors
protected int m_cDesiredExecutors
-
m_predicate
protected com.tangosol.util.function.Remote.Predicate<? super TaskExecutorService.ExecutorInfo> m_predicate
-
m_fPerformConcurrently
protected boolean m_fPerformConcurrently
Should theExecutionPlanschedule theTaskfor execution concurrently or sequentially? The default is concurrently.
-
-
Constructor Detail
-
StandardExecutionStrategy
public StandardExecutionStrategy()
Constructs aStandardExecutionStrategy(required for serialization).
-
StandardExecutionStrategy
public StandardExecutionStrategy(int cDesiredExecutors, com.tangosol.util.function.Remote.Predicate<? super TaskExecutorService.ExecutorInfo> predicate, boolean fConcurrentExecution)Constructs aStandardExecutionStrategy.- Parameters:
cDesiredExecutors- the number ofExecutors to execute theTask(-1 means all available)predicate- theRemote.Predicateto determine if anExecutoris a candidate for executing aTaskbased on theTaskExecutorService.ExecutorInfofConcurrentExecution- should the producedExecutionPlanassign theTasktoExecutors concurrently?
-
-
Method Detail
-
analyze
public ExecutionPlan analyze(ExecutionPlan currentPlan, Map<String,? extends TaskExecutorService.ExecutorInfo> mapExecutorInfo, EnumSet<ExecutionStrategy.EvaluationRationale> rationales)
Description copied from interface:ExecutionStrategyAnalyzes the currentExecutionPlanfor aTask, together with theTaskExecutorService.ExecutorInfoto produce a newExecutionPlan.- Specified by:
analyzein interfaceExecutionStrategy- Parameters:
currentPlan- the currentExecutionPlan(nullwhen undefined)mapExecutorInfo- a read-onlyMapof the currentTaskExecutorService.ExecutorInfo, one for each registeredExecutor, keyed by theExecutoridrationales- theExecutionStrategy.EvaluationRationales for evaluating theExecutionStrategy- Returns:
- new
ExecutionPlan
-
readExternal
public void readExternal(DataInput in) throws IOException
- Specified by:
readExternalin interfacecom.tangosol.io.ExternalizableLite- Throws:
IOException
-
writeExternal
public void writeExternal(DataOutput out) throws IOException
- Specified by:
writeExternalin interfacecom.tangosol.io.ExternalizableLite- Throws:
IOException
-
readExternal
public void readExternal(com.tangosol.io.pof.PofReader in) throws IOException- Specified by:
readExternalin interfacecom.tangosol.io.pof.PortableObject- Throws:
IOException
-
writeExternal
public void writeExternal(com.tangosol.io.pof.PofWriter out) throws IOException- Specified by:
writeExternalin interfacecom.tangosol.io.pof.PortableObject- Throws:
IOException
-
-