public class ExecutorTracer
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ExecutorTracer.DelegatedExecutorService
The Class DelegatedExecutorService.
|
static class |
ExecutorTracer.FinalizableDelegatedExecutorService
The Class FinalizableDelegatedExecutorService.
|
Modifier and Type | Method and Description |
---|---|
static java.util.concurrent.ExecutorService |
newCachedThreadPool()
New cached thread pool.
|
static java.util.concurrent.ExecutorService |
newCachedThreadPool(java.util.concurrent.ThreadFactory threadFactory)
New cached thread pool.
|
static java.util.concurrent.ExecutorService |
newFixedThreadPool(int nThreads)
New fixed thread pool.
|
static java.util.concurrent.ExecutorService |
newFixedThreadPool(int nThreads,
java.util.concurrent.ThreadFactory threadFactory)
New fixed thread pool.
|
static java.util.concurrent.ScheduledExecutorService |
newScheduledThreadPool(int corePoolSize)
New scheduled thread pool.
|
static java.util.concurrent.ScheduledExecutorService |
newScheduledThreadPool(int corePoolSize,
java.util.concurrent.ThreadFactory threadFactory)
New scheduled thread pool.
|
static java.util.concurrent.ExecutorService |
newSingleThreadExecutor()
New single thread executor.
|
static java.util.concurrent.ExecutorService |
newSingleThreadExecutor(java.util.concurrent.ThreadFactory threadFactory)
New single thread executor.
|
static java.util.concurrent.ScheduledExecutorService |
newSingleThreadScheduledExecutor()
New single thread scheduled executor.
|
public static java.util.concurrent.ExecutorService newFixedThreadPool(int nThreads)
nThreads
- the n threadspublic static java.util.concurrent.ExecutorService newFixedThreadPool(int nThreads, java.util.concurrent.ThreadFactory threadFactory)
nThreads
- the n threadsthreadFactory
- the thread factorypublic static java.util.concurrent.ExecutorService newCachedThreadPool(java.util.concurrent.ThreadFactory threadFactory)
threadFactory
- the thread factorypublic static java.util.concurrent.ExecutorService newCachedThreadPool()
public static java.util.concurrent.ExecutorService newSingleThreadExecutor(java.util.concurrent.ThreadFactory threadFactory)
threadFactory
- the thread factorypublic static java.util.concurrent.ExecutorService newSingleThreadExecutor()
public static java.util.concurrent.ScheduledExecutorService newSingleThreadScheduledExecutor()
public static java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int corePoolSize)
corePoolSize
- the core pool sizepublic static java.util.concurrent.ScheduledExecutorService newScheduledThreadPool(int corePoolSize, java.util.concurrent.ThreadFactory threadFactory)
corePoolSize
- the core pool sizethreadFactory
- the thread factory