- java.lang.Object
-
- io.helidon.dbclient.health.DbClientHealthCheck
-
- All Implemented Interfaces:
HealthCheck
public abstract class DbClientHealthCheck extends Object implements HealthCheck
Database health check.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classDbClientHealthCheck.BuilderFluent API builder forDbClientHealthCheck.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static DbClientHealthCheck.Builderbuilder(DbClient dbClient)A fluent API builder to create a fully customized database health check.HealthCheckResponsecall()static DbClientHealthCheckcreate(DbClient dbClient, Config config)Create a health check with configured settings for the database.protected DbClientdbClient()protected abstract Awaitable<?>execPing()Execute the ping statement.
-
-
-
Method Detail
-
create
public static DbClientHealthCheck create(DbClient dbClient, Config config)
Create a health check with configured settings for the database. This health check will execute health check as defined in providedConfignode.- Parameters:
dbClient- database client used to execute health check statementconfig-Confignode with health check configuration- Returns:
- health check that can be used with
HealthSupport.Builder.addReadiness(org.eclipse.microprofile.health.HealthCheck...)orHealthSupport.Builder.addLiveness(org.eclipse.microprofile.health.HealthCheck...)
-
builder
public static DbClientHealthCheck.Builder builder(DbClient dbClient)
A fluent API builder to create a fully customized database health check.- Parameters:
dbClient- database- Returns:
- a new builder
-
execPing
protected abstract Awaitable<?> execPing()
Execute the ping statement.- Returns:
Awaitableinstance to wait for
-
call
public HealthCheckResponse call()
- Specified by:
callin interfaceHealthCheck
-
dbClient
protected DbClient dbClient()
-
-