public class ConnectionFactoryHealthIndicator extends AbstractReactiveHealthIndicator
HealthIndicator
to validate a R2DBC ConnectionFactory
.Constructor and Description |
---|
ConnectionFactoryHealthIndicator(io.r2dbc.spi.ConnectionFactory connectionFactory)
Create a new
ConnectionFactoryHealthIndicator using the specified
ConnectionFactory and no validation query. |
ConnectionFactoryHealthIndicator(io.r2dbc.spi.ConnectionFactory connectionFactory,
String validationQuery)
Create a new
ConnectionFactoryHealthIndicator using the specified
ConnectionFactory and validation query. |
Modifier and Type | Method and Description |
---|---|
protected reactor.core.publisher.Mono<Health> |
doHealthCheck(Health.Builder builder)
Actual health check logic.
|
health
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHealth
adapt
public ConnectionFactoryHealthIndicator(io.r2dbc.spi.ConnectionFactory connectionFactory)
ConnectionFactoryHealthIndicator
using the specified
ConnectionFactory
and no validation query.connectionFactory
- the connection factoryConnection.validate(ValidationDepth)
public ConnectionFactoryHealthIndicator(io.r2dbc.spi.ConnectionFactory connectionFactory, String validationQuery)
ConnectionFactoryHealthIndicator
using the specified
ConnectionFactory
and validation query.connectionFactory
- the connection factoryvalidationQuery
- the validation query, can be null
to use connection
validationprotected final reactor.core.publisher.Mono<Health> doHealthCheck(Health.Builder builder)
AbstractReactiveHealthIndicator
doHealthCheck
in class AbstractReactiveHealthIndicator
builder
- the Health.Builder
to report health status and detailsMono
that provides the Health