Class DatabaseHealthCheck
java.lang.Object
org.gcube.informationsystem.resourceregistry.persistence.orientdb.health.DatabaseHealthCheck
- All Implemented Interfaces:
org.gcube.common.health.api.HealthCheck
Readiness of the database: the service is down when the database does not answer, since no
operation can run without it. The health report is public: its messages are fixed sentences,
the details go to the log.
- Author:
- Luca Frosini (ISTI - CNR)
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
NAME
The name of the check in the health report.- See Also:
-
UNREACHABLE
The reason given when the database does not answer.- See Also:
-
DESCRIPTION
What the check verifies, shown next to its name in the health report.- See Also:
-
-
Constructor Details
-
DatabaseHealthCheck
public DatabaseHealthCheck()
-
-
Method Details
-
getName
- Specified by:
getNamein interfaceorg.gcube.common.health.api.HealthCheck
-
getDescription
- Specified by:
getDescriptionin interfaceorg.gcube.common.health.api.HealthCheck
-
check
public org.gcube.common.health.api.response.HealthCheckResponse check()Runs a trivial query on a session of the pool.- Specified by:
checkin interfaceorg.gcube.common.health.api.HealthCheck- Returns:
upwhen the database answers,downwith the reason otherwise
-