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
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 Summary
Modifier and TypeMethodDescription@Nullable DurationCheck the delay before suppressing the watchdog heartbeat while any connection pool is starved.booleanisHealth()Check if the watchdog heartbeat is suppressed while any connection pool is starved.voidsetHealth(boolean health) Enable or disable suppressing the watchdog heartbeat while any connection pool is starved.voidsetUnhealthyDelay(@Nullable Duration unhealthyDelay) Set the delay before suppressing the watchdog heartbeat while any connection pool is starved.Methods inherited from class com.github.jpmsilva.jsystemd.spring.autoconfigure.SystemdProperties.Toggle
isEnabled, setEnabled
-
Method Details
-
isHealth
public boolean isHealth()Check if the watchdog heartbeat is suppressed while any connection pool is starved.- Returns:
trueif 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-trueto make the application unhealthy while any connection pool is starved
-
getUnhealthyDelay
Check the delay before suppressing the watchdog heartbeat while any connection pool is starved.- Returns:
- the delay, or
nullif there is no delay
-
setUnhealthyDelay
Set the delay before suppressing the watchdog heartbeat while any connection pool is starved.- Parameters:
unhealthyDelay- the delay, ornullto disable the delay
-