org.codehaus.activemq.work.pool
Class TimedOutPooledExecutor

java.lang.Object
  extended byEDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser
      extended byEDU.oswego.cs.dl.util.concurrent.PooledExecutor
          extended byorg.codehaus.activemq.work.pool.TimedOutPooledExecutor
All Implemented Interfaces:
Executor

public class TimedOutPooledExecutor
extends PooledExecutor

PooledExecutor enforcing a timed out "blocked execution policy". The works submitted to this pooled executor MUST be a WorkWrapper.

Version:
$Revision: 1.1 $ $Date: 2004/10/26 16:12:07 $

Nested Class Summary
 
Nested classes inherited from class EDU.oswego.cs.dl.util.concurrent.PooledExecutor
PooledExecutor.AbortWhenBlocked, PooledExecutor.BlockedExecutionHandler, PooledExecutor.DiscardOldestWhenBlocked, PooledExecutor.DiscardWhenBlocked, PooledExecutor.RunWhenBlocked, PooledExecutor.WaitWhenBlocked, PooledExecutor.Worker
 
Nested classes inherited from class EDU.oswego.cs.dl.util.concurrent.ThreadFactoryUser
ThreadFactoryUser.DefaultThreadFactory
 
Field Summary
 
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_
 
Constructor Summary
TimedOutPooledExecutor()
          Creates a pooled executor.
TimedOutPooledExecutor(Channel aChannel)
          Creates a pooled executor, which uses the provided Channel as its queueing mechanism.
 
Method Summary
 void execute(Runnable aTask)
          Executes the provided task, which MUST be an instance of WorkWrapper.
 
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
 

Constructor Detail

TimedOutPooledExecutor

public TimedOutPooledExecutor()
Creates a pooled executor. The Channel used to enqueue the submitted Work instance is a queueless synchronous one.


TimedOutPooledExecutor

public TimedOutPooledExecutor(Channel aChannel)
Creates a pooled executor, which uses the provided Channel as its queueing mechanism.

Parameters:
aChannel - Channel to be used to enqueue the submitted Work intances.
Method Detail

execute

public void execute(Runnable aTask)
             throws InterruptedException
Executes the provided task, which MUST be an instance of WorkWrapper.

Throws:
IllegalArgumentException - Indicates that the provided task is not a WorkWrapper instance.
InterruptedException


Copyright © 2004-2005 Protique, Ltd.. All Rights Reserved.