org.mule.util.concurrent
Class WaitPolicy

java.lang.Object
  extended by org.mule.util.concurrent.WaitPolicy
All Implemented Interfaces:
edu.emory.mathcs.backport.java.util.concurrent.RejectedExecutionHandler

public class WaitPolicy
extends Object
implements edu.emory.mathcs.backport.java.util.concurrent.RejectedExecutionHandler

A handler for unexecutable tasks that waits until the task can be submitted for execution or times out. Generously snipped from the jsr166 repository at: .


Constructor Summary
WaitPolicy()
          Constructs a WaitPolicy which waits (almost) forever.
WaitPolicy(long time, edu.emory.mathcs.backport.java.util.concurrent.TimeUnit timeUnit)
          Constructs a WaitPolicy with timeout.
 
Method Summary
 void rejectedExecution(Runnable r, edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WaitPolicy

public WaitPolicy()
Constructs a WaitPolicy which waits (almost) forever.


WaitPolicy

public WaitPolicy(long time,
                  edu.emory.mathcs.backport.java.util.concurrent.TimeUnit timeUnit)
Constructs a WaitPolicy with timeout. A negative time value is interpreted as Long.MAX_VALUE.

Method Detail

rejectedExecution

public void rejectedExecution(Runnable r,
                              edu.emory.mathcs.backport.java.util.concurrent.ThreadPoolExecutor e)
Specified by:
rejectedExecution in interface edu.emory.mathcs.backport.java.util.concurrent.RejectedExecutionHandler


Copyright © 2003-2009 MuleSource, Inc.. All Rights Reserved.