Class SpannerHealthIndicator
java.lang.Object
org.springframework.boot.actuate.health.AbstractHealthIndicator
com.google.cloud.spring.autoconfigure.spanner.health.SpannerHealthIndicator
- All Implemented Interfaces:
org.springframework.boot.actuate.health.HealthContributor,org.springframework.boot.actuate.health.HealthIndicator
public class SpannerHealthIndicator
extends org.springframework.boot.actuate.health.AbstractHealthIndicator
Default implementation of
HealthIndicator for
Spanner. Validates if connection is successful by executing query from the spannerTemplate using
SpannerTemplate.executeQuery(Statement, SpannerQueryOptions).
If there is no error, this health indicator will signal "up".
- Since:
- 2.0.6
-
Constructor Summary
ConstructorsConstructorDescriptionSpannerHealthIndicator(SpannerTemplate spannerTemplate, String validationQuery) SpannerHealthIndicator constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoHealthCheck(org.springframework.boot.actuate.health.Health.Builder builder) Methods inherited from class org.springframework.boot.actuate.health.AbstractHealthIndicator
healthMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.springframework.boot.actuate.health.HealthIndicator
getHealth
-
Constructor Details
-
SpannerHealthIndicator
SpannerHealthIndicator constructor.- Parameters:
spannerTemplate- spannerTemplate to execute queryvalidationQuery- query to execute
-
-
Method Details