|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.commons.threads.impl.DefaultThreadPool
public class DefaultThreadPool
The DefaultThreadPool class implements the ThreadPool
interface.
Instances of this class are managed by the ThreadPoolManager
.
Field Summary | |
---|---|
protected ModifiableThreadPoolConfig |
configuration
|
protected java.util.concurrent.ThreadPoolExecutor |
executor
The executor. |
protected org.slf4j.Logger |
logger
By default we use the logger for this class. |
protected String |
name
The name of this thread pool |
Constructor Summary | |
---|---|
DefaultThreadPool(String name,
ThreadPoolConfig origConfig)
Create a new thread pool. |
Method Summary | |
---|---|
void |
execute(Runnable runnable)
Execute a runnable |
ThreadPoolConfig |
getConfiguration()
The thread pool configuration. |
java.util.concurrent.ThreadPoolExecutor |
getExecutor()
|
String |
getName()
The name of the thread pool. |
void |
shutdown()
Shut down the threadpool. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final org.slf4j.Logger logger
protected final String name
protected java.util.concurrent.ThreadPoolExecutor executor
protected final ModifiableThreadPoolConfig configuration
Constructor Detail |
---|
public DefaultThreadPool(String name, ThreadPoolConfig origConfig)
name
- - The name of the thread pool. If null ThreadPoolManager.DEFAULT_THREADPOOL_NAME
is usedMethod Detail |
---|
public String getName()
ThreadPool
getName
in interface ThreadPool
ThreadPool.getName()
public ThreadPoolConfig getConfiguration()
ThreadPool
getConfiguration
in interface ThreadPool
ThreadPool.getConfiguration()
public void execute(Runnable runnable)
ThreadPool
execute
in interface ThreadPool
runnable
- The Runnable
to executeThreadPool.execute(java.lang.Runnable)
public void shutdown()
public java.util.concurrent.ThreadPoolExecutor getExecutor()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |