Package velox.api.layer1.common.helper
Class ExecutorsHelper
java.lang.Object
velox.api.layer1.common.helper.ExecutorsHelper
public class ExecutorsHelper
extends java.lang.Object
-
Constructor Summary
Constructors Constructor Description ExecutorsHelper() -
Method Summary
Modifier and Type Method Description static velox.api.layer1.common.helper.PriorityThreadPoolExecutornewOnDemandPriorityThreadPoolExecutor(java.lang.String name)static java.util.concurrent.ThreadPoolExecutornewOnDemandSingleThreadExecutor(java.lang.String name)Similar toExecutors.newSingleThreadExecutor(), but limits threads lifetime and sets a namestatic java.util.concurrent.ScheduledExecutorServicenewScheduledThreadPool(int corePoolSize, java.lang.String name)static java.util.concurrent.ThreadPoolExecutornewSingleThreadExecutor(java.lang.String name)Similar toExecutors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorServicestatic java.util.concurrent.ThreadPoolExecutornewSingleThreadExecutor(java.lang.String name, java.util.function.Consumer<java.lang.Boolean> queueEmptyCallback)Similar toExecutors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorServicestatic java.util.concurrent.ThreadPoolExecutornewThreadPoolExecutor(int corePoolSize, int maximumPoolSize, java.lang.String name)static java.util.concurrent.ThreadPoolExecutornewThreadPoolExecutor(int corePoolSize, int maximumPoolSize, java.lang.String name, java.util.concurrent.BlockingQueue<java.lang.Runnable> queue)static java.util.concurrent.ThreadPoolExecutornewThreadPoolExecutor(int corePoolSize, int maximumPoolSize, java.lang.String name, java.util.function.Consumer<java.lang.Boolean> queueEmptyCallback)
-
Constructor Details
-
ExecutorsHelper
public ExecutorsHelper()
-
-
Method Details
-
newOnDemandSingleThreadExecutor
public static java.util.concurrent.ThreadPoolExecutor newOnDemandSingleThreadExecutor(java.lang.String name)Similar toExecutors.newSingleThreadExecutor(), but limits threads lifetime and sets a name -
newSingleThreadExecutor
public static java.util.concurrent.ThreadPoolExecutor newSingleThreadExecutor(java.lang.String name)Similar toExecutors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorService -
newSingleThreadExecutor
public static java.util.concurrent.ThreadPoolExecutor newSingleThreadExecutor(java.lang.String name, java.util.function.Consumer<java.lang.Boolean> queueEmptyCallback)Similar toExecutors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorService -
newThreadPoolExecutor
public static java.util.concurrent.ThreadPoolExecutor newThreadPoolExecutor(int corePoolSize, int maximumPoolSize, java.lang.String name, java.util.function.Consumer<java.lang.Boolean> queueEmptyCallback) -
newThreadPoolExecutor
public static java.util.concurrent.ThreadPoolExecutor newThreadPoolExecutor(int corePoolSize, int maximumPoolSize, java.lang.String name) -
newThreadPoolExecutor
public static java.util.concurrent.ThreadPoolExecutor newThreadPoolExecutor(int corePoolSize, int maximumPoolSize, java.lang.String name, java.util.concurrent.BlockingQueue<java.lang.Runnable> queue) -
newScheduledThreadPool
public static java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int corePoolSize, java.lang.String name) -
newOnDemandPriorityThreadPoolExecutor
public static velox.api.layer1.common.helper.PriorityThreadPoolExecutor newOnDemandPriorityThreadPoolExecutor(java.lang.String name)
-