Interface Task.Orchestration<T>
-
- Type Parameters:
T- the type of results produced by aTask
- All Superinterfaces:
Task.SubscribedOrchestration<T>
public static interface Task.Orchestration<T> extends Task.SubscribedOrchestration<T>
Defines information concerning the orchestration of aTaskacross a set ofExecutors for a givenTaskExecutorService. This information represents the first part of an orchestration pipeline definition, which is agnostic to the final type of result. The optional second and last part of an orchestration pipeline is defined by theTask.Collectable, produced whencollect(Collector)is called.Task.SubscribedOrchestration.subscribe(Subscriber)(optional) andTask.SubscribedOrchestration.submit()may be called directly on theTask.Orchestrationif using aTask.Collectoris not desired.- See Also:
Task.Collectable
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Task.Orchestration<T>as(String sIdentity)Sets the unique identity for theTaskwhen it is orchestrated.<R> Task.Collectable<T,R>collect(Task.Collector<? super T,?,R> collector)Creates aTask.Collectablefor theTaskusing the specifiedTask.Collector, that will collect individual results fromTasks when they are executed with orchestratedExecutors.Task.Orchestration<T>concurrently()<V extends Serializable>
Task.Orchestration<T>define(String sName, V value)Defines theTask.Propertiesfor theTask.Task.Orchestration<T>filter(Remote.Predicate<? super com.oracle.coherence.concurrent.executor.TaskExecutorService.ExecutorInfo> predicate)Limit theExecutors to only those that satisfy the specifiedRemote.Predicate.Task.Orchestration<T>limit(int cLimit)Task.Orchestration<T>retain(Duration duration)Sets theDurationto retain the task after it is completed.Task.Orchestration<T>sequentially()Task.Orchestration<T>with(Task.Option... options)Sets theTask.Options for orchestration.-
Methods inherited from interface com.oracle.coherence.concurrent.executor.Task.SubscribedOrchestration
submit, subscribe
-
-
-
-
Method Detail
-
concurrently
Task.Orchestration<T> concurrently()
Specify that theTaskshould be executed concurrently on its assignedExecutors.This is the default setting for execution.
- Returns:
- the
Task.Orchestrationto permit fluent-style method chaining
-
sequentially
Task.Orchestration<T> sequentially()
- Returns:
- the
Task.Orchestrationto permit fluent-style method chaining
-
filter
Task.Orchestration<T> filter(Remote.Predicate<? super com.oracle.coherence.concurrent.executor.TaskExecutorService.ExecutorInfo> predicate)
Limit theExecutors to only those that satisfy the specifiedRemote.Predicate.- Parameters:
predicate- theTaskExecutorService.ExecutorInfopredicate- Returns:
- the
Task.Orchestrationto permit fluent-style method chaining
-
limit
Task.Orchestration<T> limit(int cLimit)
- Parameters:
cLimit- the number ofExecutors to use- Returns:
- the
Task.Orchestrationto permit fluent-style method chaining
-
as
Task.Orchestration<T> as(String sIdentity)
Sets the unique identity for theTaskwhen it is orchestrated.- Parameters:
sIdentity- the unique identity for theTask- Returns:
- the
Task.Orchestrationto permit fluent-style method chaining
-
with
Task.Orchestration<T> with(Task.Option... options)
Sets theTask.Options for orchestration.- Parameters:
options- theTask.Option- Returns:
- the
Task.Orchestrationto permit fluent-style method chaining
-
define
<V extends Serializable> Task.Orchestration<T> define(String sName, V value)
Defines theTask.Propertiesfor theTask.- Type Parameters:
V- the value type of the property- Parameters:
sName- the name of the propertyvalue- the value of the property- Returns:
- the
Task.Orchestrationto permit fluent-style method chaining
-
retain
Task.Orchestration<T> retain(Duration duration)
Sets theDurationto retain the task after it is completed.- Parameters:
duration- the duration to retain the task after it is completed.- Returns:
- the
Task.Orchestrationto permit fluent-style method chaining
-
collect
<R> Task.Collectable<T,R> collect(Task.Collector<? super T,?,R> collector)
Creates aTask.Collectablefor theTaskusing the specifiedTask.Collector, that will collect individual results fromTasks when they are executed with orchestratedExecutors.- Type Parameters:
R- the collected result type- Parameters:
collector- theTask.Collector- Returns:
- the
Task.Collectablefor theTask
-
-