Package io.micronaut.cassandra.health
Class CassandraHealthIndicator
- All Implemented Interfaces:
io.micronaut.core.order.Ordered,io.micronaut.management.health.indicator.HealthIndicator
@Requires(property="endpoints.health.cassandra.enabled",notEquals="false") @Requires(beans={io.micronaut.management.endpoint.health.HealthEndpoint.class,com.datastax.oss.driver.api.core.CqlSession.class})
@Introspected
@Singleton
public class CassandraHealthIndicator
extends io.micronaut.management.health.indicator.AbstractHealthIndicator<Map<String,Object>>
A
HealthIndicator for Cassandra, handling multiple configurations.
If any node of any CqlSession bean – that is not closed – is NodeState.UP,
then health status is HealthStatus.UP, otherwise HealthStatus.DOWN.
- Since:
- 2.2.0
- Author:
- Ilkin Ashrafli, Dean Wette
-
Field Summary
Fields inherited from class io.micronaut.management.health.indicator.AbstractHealthIndicator
executorService, healthStatusFields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE -
Constructor Summary
ConstructorsConstructorDescriptionCassandraHealthIndicator(com.datastax.oss.driver.api.core.CqlSession cqlSession) Deprecated, for removal: This API element is subject to removal in a future version.changed to support multiple configurations (i.e.CassandraHealthIndicator(List<com.datastax.oss.driver.api.core.CqlSession> cqlSessions) Constructs this health indicator using all configuredCqlSessionbeans. -
Method Summary
Methods inherited from class io.micronaut.management.health.indicator.AbstractHealthIndicator
getHealthResult, getResult, setExecutorServiceMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.micronaut.core.order.Ordered
getOrder
-
Constructor Details
-
CassandraHealthIndicator
@Deprecated(since="6.1.0", forRemoval=true) public CassandraHealthIndicator(com.datastax.oss.driver.api.core.CqlSession cqlSession) Deprecated, for removal: This API element is subject to removal in a future version.changed to support multiple configurations (i.e. collections ofCqlSessionbeans)Default constructor.- Parameters:
cqlSession- The cassandraCqlSessionto query for details
-
CassandraHealthIndicator
@Inject public CassandraHealthIndicator(List<com.datastax.oss.driver.api.core.CqlSession> cqlSessions) Constructs this health indicator using all configuredCqlSessionbeans.- Parameters:
cqlSessions- The list of cassandraCqlSessionto query for details
-
-
Method Details