Class ManagedLeaderLatchHealthCheck


  • public class ManagedLeaderLatchHealthCheck
    extends com.codahale.metrics.health.HealthCheck
    Simple check to determine if the leader latch is started (healthy) or otherwise (not healthy).

    The check also reports as unhealthy if there is no leader, or if more than one leader is reported by Curator.

    • Constructor Detail

      • ManagedLeaderLatchHealthCheck

        public ManagedLeaderLatchHealthCheck​(ManagedLeaderLatch leaderLatch)
        New health check instance for the given leader latch.
        Parameters:
        leaderLatch - the ManagedLeaderLatch to check
    • Method Detail

      • check

        protected com.codahale.metrics.health.HealthCheck.Result check()
        Specified by:
        check in class com.codahale.metrics.health.HealthCheck