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. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic velox.api.layer1.common.helper.PriorityThreadPoolExecutorstatic ThreadPoolExecutorSimilar toExecutors.newSingleThreadExecutor(), but limits threads lifetime and sets a namestatic ThreadPoolExecutorRespects priority of runnables if those are instances ofExecutorsHelper.PrioritizedRunnable, limits threads lifetime, sets a name.static ScheduledExecutorServicenewScheduledThreadPool(int corePoolSize, String name) static ThreadPoolExecutorSimilar toExecutors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorServicestatic ThreadPoolExecutornewSingleThreadExecutor(String name, Consumer<Boolean> queueEmptyCallback) Similar toExecutors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorServicestatic 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)
-
Constructor Details
-
ExecutorsHelper
public ExecutorsHelper()
-
-
Method Details
-
newOnDemandSingleThreadExecutor
Similar toExecutors.newSingleThreadExecutor(), but limits threads lifetime and sets a name -
newOnDemandSingleThreadPriorityExecutor
Respects priority of runnables if those are instances ofExecutorsHelper.PrioritizedRunnable, limits threads lifetime, sets a name. Otherwise similar toExecutors.newSingleThreadExecutor() -
newSingleThreadExecutor
Similar toExecutors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorService -
newSingleThreadExecutor
public static ThreadPoolExecutor newSingleThreadExecutor(String name, Consumer<Boolean> queueEmptyCallback) Similar toExecutors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorService -
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) -
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)
-