org.compass.core.util.concurrent
Class TimedBlockingPolicy

java.lang.Object
  extended by org.compass.core.util.concurrent.TimedBlockingPolicy
All Implemented Interfaces:
RejectedExecutionHandler

public class TimedBlockingPolicy
extends Object
implements RejectedExecutionHandler

A handler for rejected tasks that inserts the specified element into this queue, waiting if necessary up to the specified wait time for space to become available.

Author:
kimchy

Constructor Summary
TimedBlockingPolicy(long waitTime)
           
 
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

TimedBlockingPolicy

public TimedBlockingPolicy(long waitTime)
Parameters:
waitTime - wait time in milliseconds for space to become available.
Method Detail

rejectedExecution

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


Copyright (c) 2004-2009 The Compass Project.