public final class Executors extends Object
Modifier and Type | Class and Description |
---|---|
static class |
Executors.BlockPolicy
A handler for rejected tasks that will have the caller block until space is available.
|
Modifier and Type | Field and Description |
---|---|
static int |
QUEUE_MAX_LENGTH |
Modifier and Type | Method and Description |
---|---|
static ThreadPoolExecutor |
newFixedThreadPool(int threads,
String groupname)
Creates a new fixed size ThreadPoolExecutor.
|
static ThreadPoolExecutor |
newFixedThreadPool(int threads,
String groupname,
int queueSize)
Creates a new fixed size ThreadPoolExecutor
|
public static final int QUEUE_MAX_LENGTH
public static ThreadPoolExecutor newFixedThreadPool(int threads, String groupname)
threads
- the number of threadsgroupname
- a label to identify the threadpool; useful for profiling.public static ThreadPoolExecutor newFixedThreadPool(int threads, String groupname, int queueSize)
threads
- the number of threadsgroupname
- a label to identify the threadpool; useful for profiling.queueSize
- the size of the queue to store Runnables when all threads are busyCopyright © 2006–2014 Hibernate. All rights reserved.