Package io.aleph.dirigiste
Interface Executor.Controller
- Enclosing class:
Executor
public static interface Executor.Controller
-
Method Summary
Modifier and TypeMethodDescriptionint
adjustment
(Stats stats) boolean
shouldIncrement
(int currThreads)
-
Method Details
-
shouldIncrement
boolean shouldIncrement(int currThreads) - Parameters:
currThreads
- the current number of active threads- Returns:
- whether an additional thread should be spun up, a return value of false may cause a RejectedExecutionException to be thrown elsewhere
-
adjustment
- Parameters:
stats
- the statistics gathered since the last call to 'adjustment'- Returns:
- if positive, the number of threads that should be spun up, if negative the number of threads that should be spun down
-