public class ExecutorsHelper extends Object
构造器和说明 |
---|
ExecutorsHelper() |
限定符和类型 | 方法和说明 |
---|---|
static ExecutorService |
newCachedThreadPool() |
static ExecutorService |
newCachedThreadPool(ThreadFactory threadFactory) |
static ExecutorService |
newFixedThreadPool(int nThreads) |
static ExecutorService |
newFixedThreadPool(int nThreads,
ThreadFactory threadFactory) |
static ExecutorService |
newPriorityThreadPool(int coreSize,
int maxSize) |
static ScheduledExecutorService |
newScheduledThreadPool(int corePoolSize) |
static ScheduledExecutorService |
newScheduledThreadPool(int corePoolSize,
ThreadFactory threadFactory) |
static ExecutorService |
newSingleThreadExecutor() |
static ExecutorService |
newSingleThreadExecutor(ThreadFactory threadFactory) |
static ScheduledExecutorService |
newSingleThreadScheduledExecutor() |
static ScheduledExecutorService |
newSingleThreadScheduledExecutor(ThreadFactory threadFactory) |
static void |
shutdownAll() |
static List<Runnable> |
shutdownAllNOW() |
public static ExecutorService newPriorityThreadPool(int coreSize, int maxSize)
public static ExecutorService newFixedThreadPool(int nThreads)
public static ExecutorService newFixedThreadPool(int nThreads, ThreadFactory threadFactory)
public static ExecutorService newSingleThreadExecutor()
public static ExecutorService newSingleThreadExecutor(ThreadFactory threadFactory)
public static ExecutorService newCachedThreadPool()
public static ExecutorService newCachedThreadPool(ThreadFactory threadFactory)
public static ScheduledExecutorService newSingleThreadScheduledExecutor()
public static ScheduledExecutorService newSingleThreadScheduledExecutor(ThreadFactory threadFactory)
public static ScheduledExecutorService newScheduledThreadPool(int corePoolSize)
public static ScheduledExecutorService newScheduledThreadPool(int corePoolSize, ThreadFactory threadFactory)
public static final void shutdownAll()
Copyright © 2017. All rights reserved.