Package com.github.jpmsilva.jsystemd
Class PendingHealthProvider
java.lang.Object
com.github.jpmsilva.jsystemd.PendingHealthProvider
- All Implemented Interfaces:
HealthProvider
Implementation of
HealthProvider that suppresses/delays the unhealthy state of a delegate for a configurable period.- Author:
- Christian Lorenz
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.github.jpmsilva.jsystemd.HealthProvider
HealthProvider.Health -
Constructor Summary
ConstructorsConstructorDescriptionPendingHealthProvider(@NotNull HealthProvider delegate, long delay, @NotNull TemporalUnit delayUnit) Creates a new health provider that delegates the actual work to thedelegate, and delays reporting unhealthy status. -
Method Summary
-
Constructor Details
-
PendingHealthProvider
public PendingHealthProvider(@NotNull @NotNull HealthProvider delegate, long delay, @NotNull @NotNull TemporalUnit delayUnit) Creates a new health provider that delegates the actual work to thedelegate, and delays reporting unhealthy status.- Parameters:
delegate- health provider from which to obtain the true health status of the application, nevernulldelay- time that has to be elapsed before the real unhealthy status is provideddelayUnit-TemporalUnitfordelay, nevernull
-
-
Method Details
-
health
Description copied from interface:HealthProviderDetermines if an application is healthy.- Specified by:
healthin interfaceHealthProvider- Returns:
- representation of the application
HealthProvider.Healthstate
-