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, healthStatus
Fields inherited from interface io.micronaut.core.order.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
ConstructorDescriptionCassandraHealthIndicator
(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 configuredCqlSession
beans. -
Method Summary
Methods inherited from class io.micronaut.management.health.indicator.AbstractHealthIndicator
getHealthResult, getResult, setExecutorService
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods 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 ofCqlSession
beans)Default constructor.- Parameters:
cqlSession
- The cassandraCqlSession
to query for details
-
CassandraHealthIndicator
@Inject public CassandraHealthIndicator(List<com.datastax.oss.driver.api.core.CqlSession> cqlSessions) Constructs this health indicator using all configuredCqlSession
beans.- Parameters:
cqlSessions
- The list of cassandraCqlSession
to query for details
-
-
Method Details