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 aTask
across a set ofExecutor
s 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.Orchestration
if using aTask.Collector
is 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 theTask
when it is orchestrated.<R> Task.Collectable<T,R>
collect(Task.Collector<? super T,?,R> collector)
Creates aTask.Collectable
for theTask
using the specifiedTask.Collector
, that will collect individual results fromTask
s when they are executed with orchestratedExecutor
s.Task.Orchestration<T>
concurrently()
<V extends Serializable>
Task.Orchestration<T>define(String sName, V value)
Defines theTask.Properties
for theTask
.Task.Orchestration<T>
filter(Remote.Predicate<? super com.oracle.coherence.concurrent.executor.TaskExecutorService.ExecutorInfo> predicate)
Limit theExecutor
s to only those that satisfy the specifiedRemote.Predicate
.Task.Orchestration<T>
limit(int cLimit)
Task.Orchestration<T>
retain(Duration duration)
Sets theDuration
to retain the task after it is completed.Task.Orchestration<T>
sequentially()
Task.Orchestration<T>
with(Task.Option... options)
Sets theTask.Option
s for orchestration.-
Methods inherited from interface com.oracle.coherence.concurrent.executor.Task.SubscribedOrchestration
submit, subscribe
-
-
-
-
Method Detail
-
concurrently
Task.Orchestration<T> concurrently()
Specify that theTask
should be executed concurrently on its assignedExecutor
s.This is the default setting for execution.
- Returns:
- the
Task.Orchestration
to permit fluent-style method chaining
-
sequentially
Task.Orchestration<T> sequentially()
- Returns:
- the
Task.Orchestration
to permit fluent-style method chaining
-
filter
Task.Orchestration<T> filter(Remote.Predicate<? super com.oracle.coherence.concurrent.executor.TaskExecutorService.ExecutorInfo> predicate)
Limit theExecutor
s to only those that satisfy the specifiedRemote.Predicate
.- Parameters:
predicate
- theTaskExecutorService.ExecutorInfo
predicate- Returns:
- the
Task.Orchestration
to permit fluent-style method chaining
-
limit
Task.Orchestration<T> limit(int cLimit)
- Parameters:
cLimit
- the number ofExecutor
s to use- Returns:
- the
Task.Orchestration
to permit fluent-style method chaining
-
as
Task.Orchestration<T> as(String sIdentity)
Sets the unique identity for theTask
when it is orchestrated.- Parameters:
sIdentity
- the unique identity for theTask
- Returns:
- the
Task.Orchestration
to permit fluent-style method chaining
-
with
Task.Orchestration<T> with(Task.Option... options)
Sets theTask.Option
s for orchestration.- Parameters:
options
- theTask.Option
- Returns:
- the
Task.Orchestration
to permit fluent-style method chaining
-
define
<V extends Serializable> Task.Orchestration<T> define(String sName, V value)
Defines theTask.Properties
for 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.Orchestration
to permit fluent-style method chaining
-
retain
Task.Orchestration<T> retain(Duration duration)
Sets theDuration
to retain the task after it is completed.- Parameters:
duration
- the duration to retain the task after it is completed.- Returns:
- the
Task.Orchestration
to permit fluent-style method chaining
-
collect
<R> Task.Collectable<T,R> collect(Task.Collector<? super T,?,R> collector)
Creates aTask.Collectable
for theTask
using the specifiedTask.Collector
, that will collect individual results fromTask
s when they are executed with orchestratedExecutor
s.- Type Parameters:
R
- the collected result type- Parameters:
collector
- theTask.Collector
- Returns:
- the
Task.Collectable
for theTask
-
-