Class ManagedLeaderLatchHealthCheck

java.lang.Object
com.codahale.metrics.health.HealthCheck
org.kiwiproject.curator.leader.health.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.

  • 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 Summary

    Constructors
    Constructor
    Description
    New health check instance for the given leader latch.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected com.codahale.metrics.health.HealthCheck.Result
     

    Methods inherited from class com.codahale.metrics.health.HealthCheck

    clock, execute

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ManagedLeaderLatchHealthCheck

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

    • check

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