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 Details

    • BlockPolicy

      public BlockPolicy()
  • Method Details

    • 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