java.lang.Object
io.appform.ranger.core.healthservice.monitor.IsolatedHealthMonitor<HealthcheckStatus>
io.appform.ranger.core.healthservice.monitor.sample.CountMonitor
All Implemented Interfaces:
Monitor<HealthcheckStatus>, Runnable
Direct Known Subclasses:
DiskSpaceMonitor

public abstract class CountMonitor extends IsolatedHealthMonitor<HealthcheckStatus>
A monitor that can be used as a counting monitor to check if any countable entity breaches a threashhold Eg: 1. this could be used to check the heap of your java service, if heap goes beyond a threshold, after which, you would want your service to be marked as unhealthy Just extend this class and implement getCount(), where you could connect to the MBeanServerand return the current heap space being consumed 2. this could be used to keep track of the active thread count of the service
See Also:
  • Constructor Details

  • Method Details

    • monitor

      public HealthcheckStatus monitor()
      Description copied from interface: Monitor
      trigger a single check of the monitor service
      Returns:
      status of check
    • getCount

      public abstract Number getCount()
      Returns:
      the current value of the entity being monitored