Class HealthChecksDependenciesReadyCheck
java.lang.Object
nl.knaw.dans.lib.util.healthcheck.HealthChecksDependenciesReadyCheck
- All Implemented Interfaces:
io.dropwizard.lifecycle.Managed,DependenciesReadyCheck
public class HealthChecksDependenciesReadyCheck
extends Object
implements DependenciesReadyCheck, io.dropwizard.lifecycle.Managed
Implementation of
DependenciesReadyCheck that waits until all health checks are healthy.-
Constructor Summary
ConstructorsConstructorDescriptionHealthChecksDependenciesReadyCheck(io.dropwizard.core.setup.Environment environment, DependenciesReadyCheckConfig config) -
Method Summary
Modifier and TypeMethodDescriptionvoidstart()voidstop()voidwaitUntilReady(String... checks) Wait until all dependencies are ready.
-
Constructor Details
-
HealthChecksDependenciesReadyCheck
public HealthChecksDependenciesReadyCheck(io.dropwizard.core.setup.Environment environment, DependenciesReadyCheckConfig config)
-
-
Method Details
-
start
- Specified by:
startin interfaceio.dropwizard.lifecycle.Managed- Throws:
Exception
-
stop
public void stop()- Specified by:
stopin interfaceio.dropwizard.lifecycle.Managed
-
waitUntilReady
Description copied from interface:DependenciesReadyCheckWait until all dependencies are ready. This method should block until all dependencies are ready.- Specified by:
waitUntilReadyin interfaceDependenciesReadyCheck- Parameters:
checks- the names of the checks to wait for; if empty, all checks are waited for
-