com.hammurapi.flow.runtime.impl
Class DelegatingPolicy
java.lang.Object
com.hammurapi.flow.runtime.impl.DelegatingPolicy
- All Implemented Interfaces:
- RejectedExecutionHandler
public class DelegatingPolicy
- extends Object
- implements RejectedExecutionHandler
Delegates execution to another executor, e.g. executor which ships job to another processing node.
If delegate is picky and cannot execute job, the job is executed in the current thread.
- Author:
- Pavel Vlasov
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DelegatingPolicy
public DelegatingPolicy(Executor delegate)
rejectedExecution
public void rejectedExecution(Runnable r,
ThreadPoolExecutor executor)
- Specified by:
rejectedExecution in interface RejectedExecutionHandler