org.hibernate.search.util.impl

## Class Executors.BlockPolicy

- java.lang.Object
- - org.hibernate.search.util.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

    Constructors
    Constructor and Description
    `BlockPolicy()` Creates a `BlockPolicy`.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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

    - #### BlockPolicy

          public 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-2017 Red Hat, Inc. All Rights Reserved