public class ThreadPool<T extends ThreadPool<T>> extends Object
Constructor and Description |
---|
ThreadPool(String key) |
Modifier and Type | Method and Description |
---|---|
Integer |
activeCount()
The approximate number of threads that are actively executing tasks.
|
T |
activeCount(Integer value)
The approximate number of threads that are actively executing tasks.
|
void |
addPropertyChangeListener(PropertyChangeListener listener)
Adds a property change listener
|
Integer |
completedTaskCount()
The approximate total number of tasks that have completed execution.
|
T |
completedTaskCount(Integer value)
The approximate total number of tasks that have completed execution.
|
Integer |
currentThreadCount()
The current number of threads in the pool.
|
T |
currentThreadCount(Integer value)
The current number of threads in the pool.
|
String |
getKey() |
Map |
keepaliveTime()
Used to specify the amount of time that pool threads should be kept
running when idle; if not specified, threads will run until the executor
is shut down.
|
T |
keepaliveTime(Map value)
Used to specify the amount of time that pool threads should be kept
running when idle; if not specified, threads will run until the executor
is shut down.
|
T |
keepaliveTime(String key,
Object value)
Used to specify the amount of time that pool threads should be kept
running when idle; if not specified, threads will run until the executor
is shut down.
|
Integer |
largestThreadCount()
The largest number of threads that have ever simultaneously been in the
pool.
|
T |
largestThreadCount(Integer value)
The largest number of threads that have ever simultaneously been in the
pool.
|
Integer |
maxThreads()
The maximum thread pool size.
|
T |
maxThreads(Integer value)
The maximum thread pool size.
|
String |
name()
The name of the thread pool.
|
T |
name(String value)
The name of the thread pool.
|
Integer |
queueSize()
The queue size.
|
T |
queueSize(Integer value)
The queue size.
|
Integer |
rejectedCount()
The number of tasks that have been rejected.
|
T |
rejectedCount(Integer value)
The number of tasks that have been rejected.
|
void |
removePropertyChangeListener(PropertyChangeListener listener)
Removes a property change listener
|
Integer |
taskCount()
The approximate total number of tasks that have ever been scheduled for
execution.
|
T |
taskCount(Integer value)
The approximate total number of tasks that have ever been scheduled for
execution.
|
String |
threadFactory()
Specifies the name of a specific thread factory to use to create worker
threads.
|
T |
threadFactory(String value)
Specifies the name of a specific thread factory to use to create worker
threads.
|
public ThreadPool(String key)
public String getKey()
public void addPropertyChangeListener(PropertyChangeListener listener)
public void removePropertyChangeListener(PropertyChangeListener listener)
public Integer activeCount()
public T activeCount(Integer value)
public Integer completedTaskCount()
public T completedTaskCount(Integer value)
public Integer currentThreadCount()
public T currentThreadCount(Integer value)
public Map keepaliveTime()
public T keepaliveTime(Map value)
public T keepaliveTime(String key, Object value)
public Integer largestThreadCount()
public T largestThreadCount(Integer value)
public Integer maxThreads()
public T maxThreads(Integer value)
public String name()
public Integer queueSize()
public Integer rejectedCount()
public Integer taskCount()
public T taskCount(Integer value)
public String threadFactory()
Copyright © 2018 JBoss by Red Hat. All rights reserved.