public class HealthCheckManager extends Object implements com.codahale.metrics.health.HealthCheckRegistryListener, StateChangedCallback, HealthStatusChecker, ShutdownNotifier
| Constructor and Description |
|---|
HealthCheckManager(List<HealthCheckConfiguration> configs,
HealthCheckScheduler scheduler,
com.codahale.metrics.MetricRegistry metrics,
Duration shutdownWaitPeriod,
boolean initialOverallState) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
initializeAppHealth() |
boolean |
isHealthy() |
boolean |
isHealthy(String type) |
void |
notifyShutdownStarted() |
void |
onHealthCheckAdded(String name,
com.codahale.metrics.health.HealthCheck healthCheck) |
void |
onHealthCheckRemoved(String name,
com.codahale.metrics.health.HealthCheck healthCheck) |
void |
onStateChanged(String name,
boolean isNowHealthy) |
public HealthCheckManager(List<HealthCheckConfiguration> configs, HealthCheckScheduler scheduler, com.codahale.metrics.MetricRegistry metrics, Duration shutdownWaitPeriod, boolean initialOverallState)
public void onHealthCheckAdded(String name, com.codahale.metrics.health.HealthCheck healthCheck)
onHealthCheckAdded in interface com.codahale.metrics.health.HealthCheckRegistryListenerpublic void onHealthCheckRemoved(String name, com.codahale.metrics.health.HealthCheck healthCheck)
onHealthCheckRemoved in interface com.codahale.metrics.health.HealthCheckRegistryListenerpublic void onStateChanged(String name, boolean isNowHealthy)
onStateChanged in interface StateChangedCallbackprotected void initializeAppHealth()
public boolean isHealthy()
isHealthy in interface HealthStatusCheckerpublic boolean isHealthy(@Nullable String type)
isHealthy in interface HealthStatusCheckerpublic void notifyShutdownStarted()
throws Exception
notifyShutdownStarted in interface ShutdownNotifierExceptionCopyright © 2011. All rights reserved.