public class RotationStatusMonitor extends IsolatedHealthMonitor<HealthcheckStatus>
name| Constructor and Description |
|---|
RotationStatusMonitor(String filePath) |
RotationStatusMonitor(TimeEntity timeEntity,
long stalenessAllowedInMillis,
String filePath) |
RotationStatusMonitor(TimeEntity timeEntity,
String filePath) |
| Modifier and Type | Method and Description |
|---|---|
HealthcheckStatus |
monitor()
checks if the rotation file exists or not
|
disable, enable, getHealthStatus, getName, getRunInterval, hasValidUpdatedTime, isDisabled, runpublic RotationStatusMonitor(String filePath)
filePath - location of the filepublic RotationStatusMonitor(TimeEntity timeEntity, String filePath)
timeEntity - how often the monitor() check needs to be executedfilePath - location of the filepublic RotationStatusMonitor(TimeEntity timeEntity, long stalenessAllowedInMillis, String filePath)
timeEntity - how often the monitor() check needs to be executedstalenessAllowedInMillis - after how long (in milliseconds) should the monitor be regarded as stale (default: 60 seconds)filePath - location of the filepublic HealthcheckStatus monitor()
HealthcheckStatus.healthy if file exists else HealthcheckStatus.unhealthy when file doesnt existCopyright © 2015–2023. All rights reserved.