Class CuratorHealthCheck


  • public class CuratorHealthCheck
    extends com.codahale.metrics.health.HealthCheck
    A Dropwizard Metrics health check for a CuratorFramework instance.
    • Nested Class Summary

      • Nested classes/interfaces inherited from class com.codahale.metrics.health.HealthCheck

        com.codahale.metrics.health.HealthCheck.Result, com.codahale.metrics.health.HealthCheck.ResultBuilder
    • Constructor Detail

      • CuratorHealthCheck

        public CuratorHealthCheck()
    • Method Detail

      • check

        protected com.codahale.metrics.health.HealthCheck.Result check()
                                                                throws Exception
        Check health of a CuratorFramework.

        The CuratorFramework is considered healthy if its state is CuratorFrameworkState.STARTED, is connected in read/write state, and can list top-level znodes. Otherwise it is considered unhealthy, even if the state is CuratorFrameworkState.LATENT.

        Specified by:
        check in class com.codahale.metrics.health.HealthCheck
        Returns:
        the HealthCheck.Result
        Throws:
        Exception - if anything is really wrong