public class PingCheckMonitor extends IsolatedHealthMonitor<HealthcheckStatus>
HttpRequest at regular intervals
Maintains every healthcheck in a RollingWindowHealthQueue to prevent continuous flaps of healthname| Constructor and Description |
|---|
PingCheckMonitor(TimeEntity timeEntity,
org.apache.http.HttpRequest httpRequest,
Integer pingTimeoutInMilliseconds,
Integer pingWindowSize,
Integer maxFailures,
String host,
Integer port) |
| Modifier and Type | Method and Description |
|---|---|
HealthcheckStatus |
monitor()
trigger a single check of the monitor service
|
disable, enable, getHealthStatus, getName, getRunInterval, hasValidUpdatedTime, isDisabled, runpublic PingCheckMonitor(TimeEntity timeEntity, org.apache.http.HttpRequest httpRequest, Integer pingTimeoutInMilliseconds, Integer pingWindowSize, Integer maxFailures, String host, Integer port)
timeEntity - how often the monitor() 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 - portpublic HealthcheckStatus monitor()
MonitorCopyright © 2015–2023. All rights reserved.