java.lang.Object
org.apache.druid.java.util.common.concurrent.Execs

public class Execs extends Object
  • Constructor Details

    • Execs

      public Execs()
  • Method Details

    • dummy

      public static ExecutorService dummy()
      Returns an ExecutorService which is terminated and shutdown from the beginning and not able to accept any tasks.
    • singleThreaded

      public static ExecutorService singleThreaded(@NotNull @NotNull String nameFormat)
    • singleThreaded

      public static ExecutorService singleThreaded(@NotNull @NotNull String nameFormat, @Nullable Integer priority)
    • multiThreaded

      public static ExecutorService multiThreaded(int threads, @NotNull @NotNull String nameFormat)
    • multiThreaded

      public static ExecutorService multiThreaded(int threads, @NotNull @NotNull String nameFormat, @Nullable Integer priority)
    • scheduledSingleThreaded

      public static ScheduledExecutorService scheduledSingleThreaded(@NotNull @NotNull String nameFormat)
    • scheduledSingleThreaded

      public static ScheduledExecutorService scheduledSingleThreaded(@NotNull @NotNull String nameFormat, @Nullable Integer priority)
    • makeThreadFactory

      public static ThreadFactory makeThreadFactory(@NotNull @NotNull String nameFormat)
    • makeThreadFactory

      public static ThreadFactory makeThreadFactory(@NotNull @NotNull String nameFormat, @Nullable Integer priority)
    • makeThread

      public static Thread makeThread(String name, Runnable runnable, boolean isDaemon)
    • newBlockingSingleThreaded

      public static ExecutorService newBlockingSingleThreaded(String nameFormat, int capacity)
      Parameters:
      nameFormat - nameformat for threadFactory
      capacity - maximum capacity after which the executorService will block on accepting new tasks
      Returns:
      ExecutorService which blocks accepting new tasks when the capacity reached
    • newBlockingSingleThreaded

      public static ExecutorService newBlockingSingleThreaded(String nameFormat, int capacity, Integer priority)
    • newBlockingThreaded

      public static ExecutorService newBlockingThreaded(String nameFormat, int nThreads, int capacity)
    • newBlockingThreaded

      public static ExecutorService newBlockingThreaded(String nameFormat, int nThreads, int capacity, Integer priority)
    • directExecutor

      public static com.google.common.util.concurrent.ListeningExecutorService directExecutor()