Interface EnvironmentSynchronizer
- All Superinterfaces:
Serializable,org.hibernate.service.Service
public interface EnvironmentSynchronizer
extends org.hibernate.service.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 Summary
Modifier and TypeMethodDescriptionvoidwhenEnvironmentDestroying(Runnable runnable) Run the given work just before the environment is destroyed (exactly what "destroyed" means is implementation-dependent).voidwhenEnvironmentReady(Runnable runnable) Run the given work as soon as the environment is deemed "ready" (exactly what "ready" means is implementation-dependent).
-
Method Details
-
whenEnvironmentReady
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
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.
-