|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.sling.commons.threads.impl.ThreadPoolFacade
public final class ThreadPoolFacade
This is a facade which is delivered to clients. It allows to change the thread pool behind the facacde without affecting the client.
| Constructor Summary | |
|---|---|
ThreadPoolFacade(DefaultThreadPool pool)
|
|
| Method Summary | ||
|---|---|---|
void |
execute(Runnable runnable)
Execute a runnable |
|
ThreadPoolConfig |
getConfiguration()
The thread pool configuration. |
|
ThreadPoolExecutor |
getExecutor()
|
|
String |
getName()
The name of the thread pool. |
|
void |
setName(String name)
Update name |
|
void |
setPool(DefaultThreadPool pool)
Update pool |
|
void |
shutdown()
Shutdown this thread pool. |
|
|
submit(Callable<T> callable)
Submits a callable for execution |
|
Future<?> |
submit(Runnable runnable)
Submits a runnable for execution |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ThreadPoolFacade(DefaultThreadPool pool)
| Method Detail |
|---|
public void execute(Runnable runnable)
ThreadPool
execute in interface ThreadPoolrunnable - The Runnable to executeThreadPool.execute(java.lang.Runnable)public <T> Future<T> submit(Callable<T> callable)
ThreadPool
submit in interface ThreadPoolcallable - The Callable to submit
Future representing pending completion of the CallableThreadPool.submit(java.util.concurrent.Callable)public Future<?> submit(Runnable runnable)
ThreadPool
submit in interface ThreadPoolrunnable - The Runnable to submit
Future representing pending completion of the RunnableThreadPool.submit(java.lang.Runnable)public ThreadPoolConfig getConfiguration()
ThreadPool
getConfiguration in interface ThreadPoolThreadPool.getConfiguration()public String getName()
ThreadPool
getName in interface ThreadPoolThreadPool.getName()public void shutdown()
public void setName(String name)
public void setPool(DefaultThreadPool pool)
public ThreadPoolExecutor getExecutor()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||