org.mule.util.concurrent
Class WaitPolicy
java.lang.Object
org.mule.util.concurrent.WaitPolicy
- All Implemented Interfaces:
- RejectedExecutionHandler
public class WaitPolicy
- extends Object
- implements 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,
TimeUnit timeUnit)
Constructs a WaitPolicy with timeout. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
WaitPolicy
public WaitPolicy()
- Constructs a WaitPolicy which waits (almost) forever.
WaitPolicy
public WaitPolicy(long time,
TimeUnit timeUnit)
- Constructs a WaitPolicy with timeout. A negative
time
value is interpreted as Long.MAX_VALUE
.
rejectedExecution
public void rejectedExecution(Runnable r,
ThreadPoolExecutor e)
- Specified by:
rejectedExecution
in interface RejectedExecutionHandler
Copyright © 2003-2012 MuleSoft, Inc.. All Rights Reserved.