Package io.aleph.dirigiste
Class Executors
java.lang.Object
io.aleph.dirigiste.Executors
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Executor.Controller
fixedController
(int numThreads) static Executor
fixedExecutor
(int numThreads) static Executor
fixedExecutor
(int numThreads, EnumSet<Stats.Metric> metrics) static Executor.Controller
utilizationController
(double targetUtilization, int maxThreadCount) static Executor
utilizationExecutor
(double targetUtilization, int maxThreadCount) static Executor
utilizationExecutor
(double targetUtilization, int maxThreadCount, EnumSet<Stats.Metric> metrics)
-
Constructor Details
-
Executors
public Executors()
-
-
Method Details
-
fixedExecutor
- Parameters:
numThreads
- the number of threads in the thread pool
-
fixedExecutor
- Parameters:
numThreads
- the number of threads in the thread poolmetrics
- the metrics that will be gathered by the executor
-
fixedController
- Parameters:
numThreads
- the number of threads in the thread pool
-
utilizationExecutor
- Parameters:
targetUtilization
- the target level of utilization, within [0, 1]maxThreadCount
- the maximum number of threads
-
utilizationExecutor
public static Executor utilizationExecutor(double targetUtilization, int maxThreadCount, EnumSet<Stats.Metric> metrics) - Parameters:
targetUtilization
- the target level of utilization, within [0, 1]maxThreadCount
- the maximum number of threadsmetrics
- the metrics which should be gathered
-
utilizationController
public static Executor.Controller utilizationController(double targetUtilization, int maxThreadCount) - Parameters:
targetUtilization
- the target level of utilization, within [0, 1]maxThreadCount
- the maximum number of threads that can be allocated
-