- 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 class
DbClientHealthCheck.Builder
Fluent API builder forDbClientHealthCheck
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description static DbClientHealthCheck.Builder
builder(DbClient dbClient)
A fluent API builder to create a fully customized database health check.HealthCheckResponse
call()
static DbClientHealthCheck
create(DbClient dbClient, Config config)
Create a health check with configured settings for the database.protected DbClient
dbClient()
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 providedConfig
node.- Parameters:
dbClient
- database client used to execute health check statementconfig
-Config
node 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:
Awaitable
instance to wait for
-
call
public HealthCheckResponse call()
- Specified by:
call
in interfaceHealthCheck
-
dbClient
protected DbClient dbClient()
-
-