Interface EnvironmentSynchronizer
- All Superinterfaces:
Serializable
,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 TypeMethodDescriptionvoid
whenEnvironmentDestroying
(Runnable runnable) Run the given work just before the environment is destroyed (exactly what "destroyed" means is implementation-dependent).void
whenEnvironmentReady
(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.
-