Class RotationStatusMonitor

java.lang.Object
io.appform.ranger.core.healthservice.monitor.IsolatedHealthMonitor<HealthcheckStatus>
io.appform.ranger.core.healthservice.monitor.sample.RotationStatusMonitor
All Implemented Interfaces:
Monitor<HealthcheckStatus>, Runnable

public class RotationStatusMonitor extends IsolatedHealthMonitor<HealthcheckStatus>
This is a simple service in/out rotation check monitor Initialize this class with a filePath (location of the file) This monitor then:
  • Marks service as unhealthy when the file does not exist
  • Marks service as healthy when the file exists
  • Constructor Details

    • RotationStatusMonitor

      public RotationStatusMonitor(String filePath)
      Parameters:
      filePath - location of the file
    • RotationStatusMonitor

      public RotationStatusMonitor(TimeEntity timeEntity, String filePath)
      Parameters:
      timeEntity - how often the monitor() check needs to be executed
      filePath - location of the file
    • RotationStatusMonitor

      public RotationStatusMonitor(TimeEntity timeEntity, long stalenessAllowedInMillis, String filePath)
      Parameters:
      timeEntity - how often the monitor() check needs to be executed
      stalenessAllowedInMillis - after how long (in milliseconds) should the monitor be regarded as stale (default: 60 seconds)
      filePath - location of the file
  • Method Details