Interface EnvironmentSynchronizer

  • All Superinterfaces:
    Serializable, Service

    public interface EnvironmentSynchronizer
    extends Service
    A service allowing to postpone Hibernate Search initialization works to a later time, when the environment (e.g. provided services such as ManagedBeanRegistry) will be ready to accept requests.
    • Method Detail

      • whenEnvironmentReady

        void whenEnvironmentReady​(Runnable runnable)
        Run the given work as soon as the environment is deemed "ready" (exactly what "ready" means is implementation-dependent).

        If the environment is already "ready", run the work now, synchronously.

        Parameters:
        runnable - The work to run.
      • whenEnvironmentDestroying

        void whenEnvironmentDestroying​(Runnable runnable)
        Run the given work just before the environment is destroyed (exactly what "destroyed" means is implementation-dependent).

        If the environment is already "destroyed", run the work now, synchronously.

        Parameters:
        runnable - The work to run.