Class SystemdProperties.Hikari

java.lang.Object
com.github.jpmsilva.jsystemd.spring.autoconfigure.SystemdProperties.Toggle
com.github.jpmsilva.jsystemd.spring.autoconfigure.SystemdProperties.Hikari
Enclosing class:
SystemdProperties

public static class SystemdProperties.Hikari extends SystemdProperties.Toggle
The HikariStatusProvider, which provides information regarding the HikariCP connection pools.

The HikariStatusProvider is always a health provider of the watchdog, while enabled, and these properties control its health: it is opted into, as it lets systemd restart the application, so the application is always healthy unless enabled.

  • Method Details

    • isHealth

      public boolean isHealth()
      Check if the watchdog heartbeat is suppressed while any connection pool is starved.
      Returns:
      true if a starved connection pool makes the application unhealthy
    • setHealth

      public void setHealth(boolean health)
      Enable or disable suppressing the watchdog heartbeat while any connection pool is starved.
      Parameters:
      health - true to make the application unhealthy while any connection pool is starved
    • getUnhealthyDelay

      public @Nullable Duration getUnhealthyDelay()
      Check the delay before suppressing the watchdog heartbeat while any connection pool is starved.
      Returns:
      the delay, or null if there is no delay
    • setUnhealthyDelay

      public void setUnhealthyDelay(@Nullable Duration unhealthyDelay)
      Set the delay before suppressing the watchdog heartbeat while any connection pool is starved.
      Parameters:
      unhealthyDelay - the delay, or null to disable the delay