ThreadPoolManager manages thread pools.
DEFAULT_THREADPOOL_NAME
static final String DEFAULT_THREADPOOL_NAME
- The default thread pool name
- See Also:
- Constant Field Values
get
ThreadPool get(String name)
- Get a thread pool.
If there is no thread pool with the given name, a new thread pool with
the default configuration is created and returned.
A thread pool must be released when not used anymore with the
release(ThreadPool)
method.
- Parameters:
name
- The name of the thread pool or null for the default pool.
- Returns:
- A thread pool.
create
ThreadPool create(ThreadPoolConfig config)
- Create a new thread pool with this configuration.
A thread pool must be released when not used anymore with the
release(ThreadPool)
method.
- Parameters:
config
- The thread pool configuration.
- Returns:
- A new thread pool.
create
ThreadPool create(ThreadPoolConfig config,
String label)
- Create a new thread pool with this configuration.
A thread pool must be released when not used anymore with the
release(ThreadPool)
method.
- Parameters:
config
- The thread pool configuration.label
- An optional label for the thread pool. The label
will be appended to the name of the pool.
- Returns:
- A new thread pool.
- Since:
- 3.1
release
void release(ThreadPool pool)
- Release the thread pool again.
Copyright © 2007-2011 The Apache Software Foundation. All Rights Reserved.