public class RollingWindowHealthQueue extends Object
HealthcheckStatuss of size rollingWindowSize| Constructor and Description |
|---|
RollingWindowHealthQueue(Integer rollingWindowSize,
Integer maxFailures) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
checkInRollingWindow(HealthcheckStatus currentHealthStatus)
dequeues the latest incoming status, enqueues the latest health status
updates the failure counts accordingly
|
public boolean checkInRollingWindow(HealthcheckStatus currentHealthStatus)
currentHealthStatus - current health status coming from outsidetrue if the current failures in the queue are less than the maxFailure
false if the current failures in the queue are more than or equal to the maxFailuresCopyright © 2015–2022. All rights reserved.