Class PingCheckMonitor
java.lang.Object
io.appform.ranger.core.healthservice.monitor.IsolatedHealthMonitor<HealthcheckStatus>
io.appform.ranger.core.healthservice.monitor.sample.PingCheckMonitor
- All Implemented Interfaces:
Monitor<HealthcheckStatus>,Runnable
A Ping checking monitor, which executes a
HttpRequest at regular intervals
Maintains every healthcheck in a RollingWindowHealthQueue to prevent continuous flaps of health-
Field Summary
Fields inherited from class io.appform.ranger.core.healthservice.monitor.IsolatedHealthMonitor
name -
Constructor Summary
ConstructorsConstructorDescriptionPingCheckMonitor(TimeEntity timeEntity, org.apache.http.HttpRequest httpRequest, Integer pingTimeoutInMilliseconds, Integer pingWindowSize, Integer maxFailures, String host, Integer port) -
Method Summary
Methods inherited from class io.appform.ranger.core.healthservice.monitor.IsolatedHealthMonitor
disable, enable, getHealthStatus, hasValidUpdatedTime, isDisabled, run
-
Constructor Details
-
PingCheckMonitor
public PingCheckMonitor(TimeEntity timeEntity, org.apache.http.HttpRequest httpRequest, Integer pingTimeoutInMilliseconds, Integer pingWindowSize, Integer maxFailures, String host, Integer port) - Parameters:
timeEntity- how often themonitor()check needs to be executedhttpRequest- http request that will be called at regular intervalspingTimeoutInMilliseconds- timeout in milliseconds for http request execution (ping response)pingWindowSize- rolling window frame, which needs to be maintainedmaxFailures- maximum failures allowed in the rolling window framehost- host name (could be localhost)port- port
-
-
Method Details
-
monitor
Description copied from interface:Monitortrigger a single check of the monitor service- Returns:
- status of check
-