public class ThreadPool extends java.lang.ThreadGroup implements LogSource, Loggeable, Configurable, ThreadPoolMBean
Modifier and Type | Class and Description |
---|---|
static interface |
ThreadPool.Supervised
Deprecated.
|
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_MAX_THREADS
Deprecated.
|
Constructor and Description |
---|
ThreadPool()
Deprecated.
Default constructor for ThreadPool
|
ThreadPool(int poolSize,
int maxPoolSize)
Deprecated.
|
ThreadPool(int poolSize,
int maxPoolSize,
java.lang.String name)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
close()
Deprecated.
|
void |
dump(java.io.PrintStream p,
java.lang.String indent)
Deprecated.
|
void |
execute(java.lang.Runnable action)
Deprecated.
|
int |
getActiveCount()
Deprecated.
|
int |
getAvailableCount()
Deprecated.
|
int |
getIdleCount()
Deprecated.
|
int |
getJobCount()
Deprecated.
|
Logger |
getLogger()
Deprecated.
|
int |
getMaxPoolSize()
Deprecated.
|
int |
getPendingCount()
Deprecated.
|
int |
getPoolSize()
Deprecated.
|
java.lang.String |
getRealm()
Deprecated.
|
static ThreadPool |
getThreadPool(java.lang.String name)
Deprecated.
Retrieves a thread pool from NameRegistrar given its name, unique identifier.
|
void |
setConfiguration(Configuration cfg)
Deprecated.
|
void |
setLogger(Logger logger,
java.lang.String realm)
Deprecated.
|
void |
supervise()
Deprecated.
|
activeCount, activeGroupCount, allowThreadSuspension, checkAccess, destroy, enumerate, enumerate, enumerate, enumerate, getMaxPriority, getName, getParent, interrupt, isDaemon, isDestroyed, list, parentOf, resume, setDaemon, setMaxPriority, stop, suspend, toString, uncaughtException
public static final int DEFAULT_MAX_THREADS
public ThreadPool(int poolSize, int maxPoolSize)
poolSize
- starting pool sizemaxPoolSize
- maximum number of threads on this poolpublic ThreadPool(int poolSize, int maxPoolSize, java.lang.String name)
name
- pool namepoolSize
- starting pool sizemaxPoolSize
- maximum number of threads on this poolpublic ThreadPool()
public void close()
public void execute(java.lang.Runnable action) throws BlockingQueue.Closed
BlockingQueue.Closed
public void dump(java.io.PrintStream p, java.lang.String indent)
public int getJobCount()
getJobCount
in interface ThreadPoolMBean
public int getPoolSize()
getPoolSize
in interface ThreadPoolMBean
public int getMaxPoolSize()
getMaxPoolSize
in interface ThreadPoolMBean
public int getActiveCount()
public int getIdleCount()
getIdleCount
in interface ThreadPoolMBean
public int getAvailableCount()
public int getPendingCount()
getPendingCount
in interface ThreadPoolMBean
public void supervise()
public void setLogger(Logger logger, java.lang.String realm)
public java.lang.String getRealm()
public void setConfiguration(Configuration cfg) throws ConfigurationException
setConfiguration
in interface Configurable
cfg
- Configuration objectConfigurationException
public static ThreadPool getThreadPool(java.lang.String name) throws NameRegistrar.NotFoundException
name
- Name of the thread pool to retrieve, must be the same as the name property of the thread-pool tag in the QSP config fileNameRegistrar.NotFoundException
- thrown when there is not a thread-pool registered under this name.