com.hammurapi.flow.runtime.impl
Class DelegatingPolicy

java.lang.Object
  extended by 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

Constructor Summary
DelegatingPolicy(Executor delegate)
           
 
Method Summary
 void rejectedExecution(Runnable r, ThreadPoolExecutor executor)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatingPolicy

public DelegatingPolicy(Executor delegate)
Method Detail

rejectedExecution

public void rejectedExecution(Runnable r,
                              ThreadPoolExecutor executor)
Specified by:
rejectedExecution in interface RejectedExecutionHandler