Class Execs
- java.lang.Object
-
- org.apache.druid.java.util.common.concurrent.Execs
-
public class Execs extends Object
-
-
Constructor Summary
Constructors Constructor Description Execs()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static com.google.common.util.concurrent.ListeningExecutorServicedirectExecutor()static ExecutorServicedummy()Returns an ExecutorService which is terminated and shutdown from the beginning and not able to accept any tasks.static ThreadmakeThread(String name, Runnable runnable, boolean isDaemon)static ThreadFactorymakeThreadFactory(@NotNull String nameFormat)static ThreadFactorymakeThreadFactory(@NotNull String nameFormat, Integer priority)static ExecutorServicemultiThreaded(int threads, @NotNull String nameFormat)static ExecutorServicemultiThreaded(int threads, @NotNull String nameFormat, Integer priority)static ExecutorServicenewBlockingSingleThreaded(String nameFormat, int capacity)static ExecutorServicenewBlockingSingleThreaded(String nameFormat, int capacity, Integer priority)static ExecutorServicenewBlockingThreaded(String nameFormat, int nThreads, int capacity)static ExecutorServicenewBlockingThreaded(String nameFormat, int nThreads, int capacity, Integer priority)static ScheduledExecutorServicescheduledSingleThreaded(@NotNull String nameFormat)static ScheduledExecutorServicescheduledSingleThreaded(@NotNull String nameFormat, Integer priority)static ExecutorServicesingleThreaded(@NotNull String nameFormat)static ExecutorServicesingleThreaded(@NotNull String nameFormat, Integer priority)
-
-
-
Method Detail
-
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)
-
newBlockingSingleThreaded
public static ExecutorService newBlockingSingleThreaded(String nameFormat, int capacity)
- Parameters:
nameFormat- nameformat for threadFactorycapacity- 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()
-
-