Class Executors

java.lang.Object
io.aleph.dirigiste.Executors

public class Executors extends Object
  • Constructor Details

    • Executors

      public Executors()
  • Method Details

    • fixedExecutor

      public static Executor fixedExecutor(int numThreads)
      Parameters:
      numThreads - the number of threads in the thread pool
    • fixedExecutor

      public static Executor fixedExecutor(int numThreads, EnumSet<Stats.Metric> metrics)
      Parameters:
      numThreads - the number of threads in the thread pool
      metrics - the metrics that will be gathered by the executor
    • fixedController

      public static Executor.Controller fixedController(int numThreads)
      Parameters:
      numThreads - the number of threads in the thread pool
    • utilizationExecutor

      public static Executor utilizationExecutor(double targetUtilization, int maxThreadCount)
      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 threads
      metrics - 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