Class DatabaseMonitor
java.lang.Object
de.xima.fc.db.DatabaseMonitor
@Eager
@ApplicationScoped
@Deprecated(since="8.5.0",
forRemoval=true)
public class DatabaseMonitor
extends Object
Deprecated, for removal: This API element is subject to removal in a future version.
Monitors the database connection status.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionDeprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionbooleancheck()Deprecated, for removal: This API element is subject to removal in a future version.Checks whether the database connection is healthy, i.e. whether the database is reachable.static booleanDeprecated, for removal: This API element is subject to removal in a future version.Checks whether the last known status of the database connection is connected.static voidDeprecated, for removal: This API element is subject to removal in a future version.static voidDeprecated, for removal: This API element is subject to removal in a future version.static voidDeprecated, for removal: This API element is subject to removal in a future version.static booleanDeprecated, for removal: This API element is subject to removal in a future version.Checks whether the database connection is healthy, i.e. whether the database is reachable.
-
Field Details
-
DB_HEALTHCHECK_NAME
Deprecated.
-
-
Constructor Details
-
DatabaseMonitor
public DatabaseMonitor()Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
isConnected
public static boolean isConnected()Deprecated, for removal: This API element is subject to removal in a future version.Checks whether the last known status of the database connection is connected. A check is run in a fixed interval. UsetestConnection()to run a check now.- Returns:
trueif the database connection is connected,falseotherwise.
-
check
public boolean check()Deprecated, for removal: This API element is subject to removal in a future version.Checks whether the database connection is healthy, i.e. whether the database is reachable.- Returns:
trueif the database connection is healthy,falseotherwise.
-
testConnection
public static boolean testConnection()Deprecated, for removal: This API element is subject to removal in a future version.Checks whether the database connection is healthy, i.e. whether the database is reachable. In contrast withisConnected(), this method actually performs a check and tries to reach the database, instead of returning the current status.- Returns:
trueif the database connection is healthy,falseotherwise.
-
registerConnectionEstablishedListener
Deprecated, for removal: This API element is subject to removal in a future version. -
registerDisconnectedListener
Deprecated, for removal: This API element is subject to removal in a future version. -
registerReconnectedListener
Deprecated, for removal: This API element is subject to removal in a future version.
-
SystemPersistenceHealthProvider