EDU.oswego.cs.dl.util.concurrent
protected class: PooledExecutor.DiscardOldestWhenBlocked [javadoc |
source]
java.lang.Object
EDU.oswego.cs.dl.util.concurrent.PooledExecutor$DiscardOldestWhenBlocked
All Implemented Interfaces:
BlockedExecutionHandler
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.)
*
Method from EDU.oswego.cs.dl.util.concurrent.PooledExecutor$DiscardOldestWhenBlocked Summary: |
---|
blockedAction |
Methods from java.lang.Object: |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method from EDU.oswego.cs.dl.util.concurrent.PooledExecutor$DiscardOldestWhenBlocked Detail: |
public boolean blockedAction(Runnable command) throws InterruptedException {
handOff_.poll(0);
if (!handOff_.offer(command, 0))
command.run();
return true;
}
|