Class PendingHealthProvider

java.lang.Object
com.github.jpmsilva.jsystemd.PendingHealthProvider
All Implemented Interfaces:
HealthProvider

public class PendingHealthProvider
extends Object
implements HealthProvider
Implementation of HealthProvider that suppresses/delays the unhealthy state of a delegate for a configurable period.
Author:
Christian Lorenz
  • 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 the delegate, and delays reporting unhealthy status.
      Parameters:
      delegate - health provider from which to obtain the true health status of the application, never null
      delay - time that has to be elapsed before the real unhealthy status is provided
      delayUnit - TemporalUnit for delay, never null
  • Method Details