Interface SchedulerMultiWorkerSupport
-
- All Known Implementing Classes:
ComputationScheduler
,ComputationScheduler.FixedSchedulerPool
public interface SchedulerMultiWorkerSupport
Allows retrieving multiple workers from the implementingScheduler
in a way that when asking for at most the parallelism level of the Scheduler, thoseScheduler.Worker
instances will be running with different backing threads.History: 2.1.8 - experimental
- Since:
- 2.2
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static interface
SchedulerMultiWorkerSupport.WorkerCallback
The callback interface for thecreateWorkers(int, WorkerCallback)
method.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
createWorkers(int number, @NonNull SchedulerMultiWorkerSupport.WorkerCallback callback)
Creates the given number ofScheduler.Worker
instances that are possibly backed by distinct threads and calls the specifiedConsumer
with them.
-
-
-
Method Detail
-
createWorkers
void createWorkers(int number, @NonNull @NonNull SchedulerMultiWorkerSupport.WorkerCallback callback)
Creates the given number ofScheduler.Worker
instances that are possibly backed by distinct threads and calls the specifiedConsumer
with them.- Parameters:
number
- the number of workers to create, positivecallback
- the callback to send worker instances to
-
-