Class ThreadPoolProviderImpl.BlockPolicy
- java.lang.Object
-
- org.hibernate.search.engine.environment.thread.impl.ThreadPoolProviderImpl.BlockPolicy
-
- All Implemented Interfaces:
RejectedExecutionHandler
- Enclosing class:
- ThreadPoolProviderImpl
public static class ThreadPoolProviderImpl.BlockPolicy extends Object implements RejectedExecutionHandler
A handler for rejected tasks that will have the caller block until space is available.
-
-
Constructor Summary
Constructors Constructor Description BlockPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidrejectedExecution(Runnable r, ThreadPoolExecutor e)Puts the Runnable to the blocking queue, effectively blocking the delegating thread until space is available.
-
-
-
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:
rejectedExecutionin interfaceRejectedExecutionHandler- Parameters:
r- the runnable task requested to be executede- the executor attempting to execute this task
-
-