|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser EDU.oswego.cs.dl.util.concurrent.PooledExecutor org.apache.cocoon.components.thread.DefaultThreadPool
public class DefaultThreadPool
The DefaultThreadPool class implements the ThreadPool
interface.
Instances of this class are made by the RunnableManager
passing a
configuration into the configure
method.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class EDU.oswego.cs.dl.util.concurrent.PooledExecutor |
---|
EDU.oswego.cs.dl.util.concurrent.PooledExecutor.AbortWhenBlocked, EDU.oswego.cs.dl.util.concurrent.PooledExecutor.BlockedExecutionHandler, EDU.oswego.cs.dl.util.concurrent.PooledExecutor.DiscardOldestWhenBlocked, EDU.oswego.cs.dl.util.concurrent.PooledExecutor.DiscardWhenBlocked, EDU.oswego.cs.dl.util.concurrent.PooledExecutor.RunWhenBlocked, EDU.oswego.cs.dl.util.concurrent.PooledExecutor.WaitWhenBlocked, EDU.oswego.cs.dl.util.concurrent.PooledExecutor.Worker |
Nested classes/interfaces inherited from class EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser |
---|
EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser.DefaultThreadFactory |
Field Summary | |
---|---|
static String |
POLICY_DEFAULT
Default ThreadPool block policy |
Fields inherited from class EDU.oswego.cs.dl.util.concurrent.PooledExecutor |
---|
blockedExecutionHandler_, DEFAULT_KEEPALIVETIME, DEFAULT_MAXIMUMPOOLSIZE, DEFAULT_MINIMUMPOOLSIZE, handOff_, keepAliveTime_, maximumPoolSize_, minimumPoolSize_, poolSize_, shutdown_, threads_ |
Fields inherited from class EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser |
---|
threadFactory_ |
Fields inherited from interface org.apache.cocoon.components.thread.ThreadPool |
---|
POLICY_ABORT, POLICY_DISCARD, POLICY_DISCARD_OLDEST, POLICY_RUN, POLICY_WAIT, ROLE |
Method Summary | |
---|---|
void |
enableLogging(Logger logger)
Set the logger |
void |
execute(Runnable command)
Execute a command |
String |
getBlockPolicy()
DOCUMENT ME! |
int |
getMaximumQueueSize()
DOCUMENT ME! |
int |
getMaxQueueSize()
DOCUMENT ME! |
String |
getName()
The Name of this thread pool |
int |
getPriority()
Get hte priority used to create Threads |
int |
getQueueSize()
DOCUMENT ME! |
boolean |
isQueued()
Whether this DefaultThreadPool has a queue |
void |
shutdown()
Terminates all threads possibly awaiting processing all elements currently in queue. |
Methods inherited from class EDU.oswego.cs.dl.util.concurrent.PooledExecutor |
---|
abortWhenBlocked, addThread, awaitTerminationAfterShutdown, awaitTerminationAfterShutdown, createThreads, discardOldestWhenBlocked, discardWhenBlocked, drain, getBlockedExecutionHandler, getKeepAliveTime, getMaximumPoolSize, getMinimumPoolSize, getPoolSize, getTask, interruptAll, isTerminatedAfterShutdown, runWhenBlocked, setBlockedExecutionHandler, setKeepAliveTime, setMaximumPoolSize, setMinimumPoolSize, shutdownAfterProcessingCurrentlyQueuedTasks, shutdownAfterProcessingCurrentlyQueuedTasks, shutdownNow, shutdownNow, waitWhenBlocked, workerDone |
Methods inherited from class EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser |
---|
getThreadFactory, setThreadFactory |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.cocoon.components.thread.ThreadPool |
---|
getKeepAliveTime, getMaximumPoolSize, getMinimumPoolSize, getPoolSize, isTerminatedAfterShutdown |
Field Detail |
---|
public static final String POLICY_DEFAULT
Method Detail |
---|
public String getBlockPolicy()
getBlockPolicy
in interface ThreadPool
public int getMaxQueueSize()
ThreadPool.getQueueSize()
public int getMaximumQueueSize()
getMaximumQueueSize
in interface ThreadPool
ThreadPool.getQueueSize()
public String getName()
ThreadPool
getName
in interface ThreadPool
ThreadPool.getName()
public int getPriority()
getPriority
in interface ThreadPool
Thread.MIN_PRIORITY
, Thread.NORM_PRIORITY
, or
Thread.MAX_PRIORITY
public int getQueueSize()
getQueueSize
in interface ThreadPool
ThreadPool.getQueueSize()
public boolean isQueued()
isQueued
in interface ThreadPool
ThreadPool.isQueued()
public void enableLogging(Logger logger)
enableLogging
in interface LogEnabled
logger
- LogEnabled.enableLogging(org.apache.avalon.framework.logger.Logger)
public void execute(Runnable command) throws InterruptedException
execute
in interface EDU.oswego.cs.dl.util.concurrent.Executor
execute
in interface ThreadPool
execute
in class EDU.oswego.cs.dl.util.concurrent.PooledExecutor
command
- The Runnable
to execute
InterruptedException
- In case of interruptionpublic void shutdown()
ThreadPool
shutdown
in interface ThreadPool
ThreadPool.shutdown()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |