EDU.oswego.cs.dl.util.concurrent
Class PooledExecutor.DiscardOldestWhenBlocked
java.lang.Object
EDU.oswego.cs.dl.util.concurrent.PooledExecutor.DiscardOldestWhenBlocked
- PooledExecutor
- PooledExecutor.BlockedExecutionHandler
protected class PooledExecutor.DiscardOldestWhenBlocked
extends java.lang.Object
Class defining DiscardOldest action. Under this policy, at most
one old unhandled task is discarded. If the new task can then be
handed off, it is. Otherwise, the new task is run in the current
thread (i.e., RunWhenBlocked is used as a backup policy.)
boolean | blockedAction(Runnable command) - Return true if successfully handled so, execute should
terminate; else return false if execute loop should be retried.
|
blockedAction
public boolean blockedAction(Runnable command)
throws InterruptedException
Return true if successfully handled so, execute should
terminate; else return false if execute loop should be retried.
- blockedAction in interface PooledExecutor.BlockedExecutionHandler