Package velox.api.layer1.common.helper
Class ExecutorsHelper
java.lang.Object
velox.api.layer1.common.helper.ExecutorsHelper
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classRunnable with an integer priority. -
Method Summary
Modifier and TypeMethodDescriptionstatic ThreadPoolExecutornewFixedThreadPoolExecutor(int poolSize, String name) Deprecated.static ExecutorServicenewFixedThreadPoolExecutorService(int poolSize, String name) Similar tonewFixedThreadPoolExecutor(int, String), but wrapped with auto-shutdown functionality.static velox.api.layer1.common.helper.PriorityThreadPoolExecutorstatic ThreadPoolExecutorDeprecated.UsenewOnDemandSingleThreadExecutorService(String)instead.static ExecutorServiceSimilar tonewOnDemandSingleThreadExecutor(String), but wrapped with auto-shutdown functionality.static ThreadPoolExecutorDeprecated.static ExecutorServiceSimilar tonewOnDemandSingleThreadPriorityExecutor(String), but wrapped with auto-shutdown functionality.static ScheduledExecutorServicenewScheduledThreadPool(int corePoolSize, String name) static ThreadPoolExecutorDeprecated.UsenewSingleThreadExecutorService(String)instead.static ThreadPoolExecutornewSingleThreadExecutor(String name, Consumer<Boolean> queueEmptyCallback) Deprecated.UsenewSingleThreadExecutorService(String, Consumer)instead.static ExecutorServiceSimilar tonewSingleThreadExecutor(String), but wrapped with auto-shutdown functionality.static ExecutorServicenewSingleThreadExecutorService(String name, Consumer<Boolean> queueEmptyCallback) Similar tonewSingleThreadExecutor(String), but wrapped with auto-shutdown functionality.static ThreadPoolExecutornewThreadPoolExecutor(int corePoolSize, int maximumPoolSize, String name) static ThreadPoolExecutornewThreadPoolExecutor(int corePoolSize, int maximumPoolSize, String name, BlockingQueue<Runnable> queue) static ThreadPoolExecutornewThreadPoolExecutor(int corePoolSize, int maximumPoolSize, String name, BlockingQueue<Runnable> queue, RejectedExecutionHandler handler) static ThreadPoolExecutornewThreadPoolExecutor(int corePoolSize, int maximumPoolSize, String name, Consumer<Boolean> queueEmptyCallback) static ThreadPoolExecutornewThreadPoolPriorityExecutor(int corePoolSize, int maximumPoolSize, String name)
-
Method Details
-
newOnDemandSingleThreadExecutor
Deprecated.UsenewOnDemandSingleThreadExecutorService(String)instead.Similar toExecutors.newSingleThreadExecutor(), but limits threads lifetime and sets a name -
newOnDemandSingleThreadExecutorService
Similar tonewOnDemandSingleThreadExecutor(String), but wrapped with auto-shutdown functionality. -
newOnDemandSingleThreadPriorityExecutor
Deprecated.Respects priority of runnables if those are instances ofExecutorsHelper.PrioritizedRunnable, limits threads lifetime, sets a name. Otherwise similar toExecutors.newSingleThreadExecutor() -
newOnDemandSingleThreadPriorityExecutorService
Similar tonewOnDemandSingleThreadPriorityExecutor(String), but wrapped with auto-shutdown functionality. -
newSingleThreadExecutor
Deprecated.UsenewSingleThreadExecutorService(String)instead.Similar toExecutors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorService -
newSingleThreadExecutorService
Similar tonewSingleThreadExecutor(String), but wrapped with auto-shutdown functionality. -
newSingleThreadExecutor
@Deprecated public static ThreadPoolExecutor newSingleThreadExecutor(String name, Consumer<Boolean> queueEmptyCallback) Deprecated.UsenewSingleThreadExecutorService(String, Consumer)instead.Similar toExecutors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorService -
newSingleThreadExecutorService
public static ExecutorService newSingleThreadExecutorService(String name, Consumer<Boolean> queueEmptyCallback) Similar tonewSingleThreadExecutor(String), but wrapped with auto-shutdown functionality. -
newThreadPoolExecutor
public static ThreadPoolExecutor newThreadPoolExecutor(int corePoolSize, int maximumPoolSize, String name, Consumer<Boolean> queueEmptyCallback) -
newThreadPoolExecutor
public static ThreadPoolExecutor newThreadPoolExecutor(int corePoolSize, int maximumPoolSize, String name) -
newFixedThreadPoolExecutor
Deprecated.UsenewFixedThreadPoolExecutorService(int, String)instead. -
newFixedThreadPoolExecutorService
Similar tonewFixedThreadPoolExecutor(int, String), but wrapped with auto-shutdown functionality. -
newThreadPoolPriorityExecutor
public static ThreadPoolExecutor newThreadPoolPriorityExecutor(int corePoolSize, int maximumPoolSize, String name) -
newThreadPoolExecutor
public static ThreadPoolExecutor newThreadPoolExecutor(int corePoolSize, int maximumPoolSize, String name, BlockingQueue<Runnable> queue) -
newThreadPoolExecutor
public static ThreadPoolExecutor newThreadPoolExecutor(int corePoolSize, int maximumPoolSize, String name, BlockingQueue<Runnable> queue, RejectedExecutionHandler handler) -
newScheduledThreadPool
-
newOnDemandPriorityThreadPoolExecutor
public static velox.api.layer1.common.helper.PriorityThreadPoolExecutor newOnDemandPriorityThreadPoolExecutor(String name)
-
newFixedThreadPoolExecutorService(int, String)instead.