ExecutorsHelper
Package: velox.api.layer1.common.helper
Type: Class
Inheritance: java.lang.Object รขโ โ ExecutorsHelper
Nested Classesโ
ExecutorsHelper.PrioritizedRunnableโ
Runnable with an integer priority.
Constructorsโ
ExecutorsHelperโ
public ExecutorsHelper()
Methodsโ
newOnDemandSingleThreadExecutorโ
public static ThreadPoolExecutor newOnDemandSingleThreadExecutor(String name)
Similar to Executors.newSingleThreadExecutor(), but limits threads lifetime and sets a name.
newOnDemandSingleThreadPriorityExecutorโ
public static ThreadPoolExecutor newOnDemandSingleThreadPriorityExecutor(String name)
Respects priority of runnables if those are instances of ExecutorsHelper.PrioritizedRunnable, limits threads lifetime, sets a name. Otherwise similar to Executors.newSingleThreadExecutor()
newSingleThreadExecutorโ
public static ThreadPoolExecutor newSingleThreadExecutor(String name)
Similar to Executors.newSingleThreadExecutor(), but sets a name and isn't wrapped in FinalizableDelegatedExecutorService.
newSingleThreadExecutorโ
public static ThreadPoolExecutor newSingleThreadExecutor(String name, Consumer<Boolean> queueEmptyCallback)
Similar to Executors.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)
newFixedThreadPoolExecutorโ
public static ThreadPoolExecutor newFixedThreadPoolExecutor(int poolSize, 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โ
public static ScheduledExecutorService newScheduledThreadPool(int corePoolSize, String name)
newOnDemandPriorityThreadPoolExecutorโ
public static velox.api.layer1.common.helper.PriorityThreadPoolExecutor newOnDemandPriorityThreadPoolExecutor(String name)