Interface SchedulerMultiWorkerSupport
-
- All Known Implementing Classes:
ComputationScheduler,ComputationScheduler.FixedSchedulerPool
public interface SchedulerMultiWorkerSupportAllows retrieving multiple workers from the implementingSchedulerin a way that when asking for at most the parallelism level of the Scheduler, thoseScheduler.Workerinstances 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 interfaceSchedulerMultiWorkerSupport.WorkerCallbackThe callback interface for thecreateWorkers(int, WorkerCallback)method.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcreateWorkers(int number, @NonNull SchedulerMultiWorkerSupport.WorkerCallback callback)Creates the given number ofScheduler.Workerinstances that are possibly backed by distinct threads and calls the specifiedConsumerwith them.
-
-
-
Method Detail
-
createWorkers
void createWorkers(int number, @NonNull @NonNull SchedulerMultiWorkerSupport.WorkerCallback callback)Creates the given number ofScheduler.Workerinstances that are possibly backed by distinct threads and calls the specifiedConsumerwith them.- Parameters:
number- the number of workers to create, positivecallback- the callback to send worker instances to
-
-