public interface BasicThreadPoolMBean extends ThreadPoolMBean
Modifier and Type | Method and Description |
---|---|
BlockingMode |
getBlockingMode() |
ClassLoaderSource |
getClassLoaderSource()
Gets the source of the classloader that will be set as the
thread context classloader
for pool threads. |
long |
getKeepAliveTime()
Get the keep alive time
|
int |
getMaximumQueueSize()
Get the maximum queue size
|
int |
getQueueSize()
Get the current queue size
|
String |
getThreadGroupName()
Retrieve the thread group name
|
void |
setBlockingMode(BlockingMode mode)
Set the behavior of the pool when a task is added and the queue is full.
|
void |
setClassLoaderSource(ClassLoaderSource classLoaderSource)
Sets the source of the classloader that will be set as the
thread context classloader
for pool threads. |
void |
setKeepAliveTime(long time)
Set the keep alive time
|
void |
setMaximumQueueSize(int size)
Set the maximum queue size
|
void |
setThreadGroupName(String threadGroupName)
Set the thread group name
|
getInstance, getMaximumPoolSize, getMinimumPoolSize, getName, getPoolNumber, getPoolSize, setMaximumPoolSize, setMinimumPoolSize, setName, stop
int getQueueSize()
int getMaximumQueueSize()
void setMaximumQueueSize(int size)
size
- the new maximum queue sizeBlockingMode getBlockingMode()
void setBlockingMode(BlockingMode mode)
mode
- one of run, wait, discard, discardOldest or abort without
regard to case.String getThreadGroupName()
void setThreadGroupName(String threadGroupName)
threadGroupName
- - the thread group namelong getKeepAliveTime()
void setKeepAliveTime(long time)
time
- the keep alive timeClassLoaderSource getClassLoaderSource()
thread context classloader
for pool threads.ClassLoaderSource
. May return null
.void setClassLoaderSource(ClassLoaderSource classLoaderSource)
thread context classloader
for pool threads. If set, whenever any new pool thread is created, it's
context classloader will be set to the loader provided by this source.
Further, when any thread is returned to the pool, its context classloader
will be reset to the loader provided by this source.
If set to null
(the default), the pool will not attempt to
manage the context classloader for pool threads; instead a newly created
pool thread will inherit its context classloader from whatever thread
triggered the addition to the pool. A thread returned to the pool will
not have its context classloader changed from whatever it was.
classLoaderSource
- the ClassLoaderSource
. May be null
.Copyright © 2018 JBoss by Red Hat. All rights reserved.