Interface EnvironmentSynchronizer
-
- All Superinterfaces:
Serializable,org.hibernate.service.Service
public interface EnvironmentSynchronizer extends org.hibernate.service.ServiceA service allowing to postpone Hibernate Search initialization works to a later time, when the environment (e.g. provided services such asManagedBeanRegistry) will be ready to accept requests.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidwhenEnvironmentDestroying(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 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.
-
-