Skip to main content

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)