org.hibernate.search.batchindexing.impl
Class Executors.BlockPolicy

java.lang.Object
  extended by org.hibernate.search.batchindexing.impl.Executors.BlockPolicy
All Implemented Interfaces:
RejectedExecutionHandler
Enclosing class:
Executors

public static class Executors.BlockPolicy
extends Object
implements RejectedExecutionHandler

A handler for rejected tasks that will have the caller block until space is available.


Constructor Summary
Executors.BlockPolicy()
          Creates a BlockPolicy.
 
Method Summary
 void rejectedExecution(Runnable r, ThreadPoolExecutor e)
          Puts the Runnable to the blocking queue, effectively blocking the delegating thread until space is available.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Executors.BlockPolicy

public Executors.BlockPolicy()
Creates a BlockPolicy.

Method Detail

rejectedExecution

public void rejectedExecution(Runnable r,
                              ThreadPoolExecutor e)
Puts the Runnable to the blocking queue, effectively blocking the delegating thread until space is available.

Specified by:
rejectedExecution in interface RejectedExecutionHandler
Parameters:
r - the runnable task requested to be executed
e - the executor attempting to execute this task


Copyright © 2006-2012 Red Hat Middleware, LLC. All Rights Reserved