Class IsolatedHealthMonitor<T>
java.lang.Object
io.appform.ranger.core.healthservice.monitor.IsolatedHealthMonitor<T>
- Direct Known Subclasses:
CountMonitor,PingCheckMonitor,RotationStatusMonitor
-
Field Summary
Fields -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedIsolatedHealthMonitor(String name, TimeEntity runInterval) protectedIsolatedHealthMonitor(String name, TimeEntity runInterval, long stalenessAllowedInMillis) -
Method Summary
Modifier and TypeMethodDescriptionvoiddisable()disable the monitor, and dont use this monitor to track the aggregated health of the system monitor is enabled by defaultvoidenable()enable the monitor, and consider it while aggregating the health of the system monitor is enabled by defaultbooleanhasValidUpdatedTime(Date currentTime) booleanvoidrun()updates the healthStatus with the latest value from the monitor check also updates thelastStatusUpdateTime
-
Field Details
-
name
-
-
Constructor Details
-
IsolatedHealthMonitor
- Parameters:
name- name of the monitorrunInterval- initial delay, time interval of how regularly the monitor is to be run, and timeunit to specify how often theMonitor.monitor()check needs to be executed
-
IsolatedHealthMonitor
- Parameters:
name- name of the monitorrunInterval- initial delay, time interval of how regularly the monitor is to be run, and timeunit to specify how often theMonitor.monitor()check needs to be executedstalenessAllowedInMillis- after how long (in milliseconds) should the monitor be regarded as stale (default: 60 seconds)
-
-
Method Details
-
run
public void run()updates the healthStatus with the latest value from the monitor check also updates thelastStatusUpdateTime -
disable
public void disable()disable the monitor, and dont use this monitor to track the aggregated health of the system monitor is enabled by default -
enable
public void enable()enable the monitor, and consider it while aggregating the health of the system monitor is enabled by default -
getHealthStatus
-
isDisabled
public boolean isDisabled()- Specified by:
isDisabledin interfaceMonitor<T>- Returns:
- true if the monitor is disabled, else false
-
hasValidUpdatedTime
-