public class ThreadPool extends Object
| Modifier and Type | Class and Description |
|---|---|
private class |
ThreadPool.NameThreadFactory |
| Modifier and Type | Field and Description |
|---|---|
private ThreadPoolExecutor |
pool |
private static int |
QUEUE_SIZE |
| Modifier | Constructor and Description |
|---|---|
private |
ThreadPool(String poolName,
int minThread,
int maxThread,
long waitTime) |
| Modifier and Type | Method and Description |
|---|---|
void |
execute(Runnable r) |
int |
getQueueSize() |
ThreadPoolExecutor |
getThreadPool() |
boolean |
isShutdown() |
static ThreadPool |
newInstance(String poolName) |
static ThreadPool |
newInstance(String poolName,
int minThread,
int maxThread,
long waitTime) |
void |
shutdown() |
Future<?> |
submit(Runnable r) |
private ThreadPoolExecutor pool
private static final int QUEUE_SIZE
private ThreadPool(String poolName, int minThread, int maxThread, long waitTime)
public static ThreadPool newInstance(String poolName)
public static ThreadPool newInstance(String poolName, int minThread, int maxThread, long waitTime)
public ThreadPoolExecutor getThreadPool()
public int getQueueSize()
public boolean isShutdown()
public void shutdown()
public void execute(Runnable r)
Copyright © 2015. All rights reserved.