org.apache.sling.commons.threads.impl
Class ThreadPoolFacade

java.lang.Object
  extended by org.apache.sling.commons.threads.impl.ThreadPoolFacade
All Implemented Interfaces:
ThreadPool

public final class ThreadPoolFacade
extends Object
implements ThreadPool

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.
 java.util.concurrent.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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ThreadPoolFacade

public ThreadPoolFacade(DefaultThreadPool pool)
Method Detail

execute

public void execute(Runnable runnable)
Description copied from interface: ThreadPool
Execute a runnable

Specified by:
execute in interface ThreadPool
Parameters:
runnable - The Runnable to execute
See Also:
ThreadPool.execute(java.lang.Runnable)

getConfiguration

public ThreadPoolConfig getConfiguration()
Description copied from interface: ThreadPool
The thread pool configuration.

Specified by:
getConfiguration in interface ThreadPool
See Also:
ThreadPool.getConfiguration()

getName

public String getName()
Description copied from interface: ThreadPool
The name of the thread pool.

Specified by:
getName in interface ThreadPool
See Also:
ThreadPool.getName()

shutdown

public void shutdown()
Shutdown this thread pool.


setName

public void setName(String name)
Update name


setPool

public void setPool(DefaultThreadPool pool)
Update pool


getExecutor

public java.util.concurrent.ThreadPoolExecutor getExecutor()


Copyright © 2007-2013 The Apache Software Foundation. All Rights Reserved.