public class Neo4jHealthIndicator extends AbstractHealthIndicator
HealthIndicator
that tests the status of a Neo4j by executing a Cypher
statement.Constructor and Description |
---|
Neo4jHealthIndicator(org.neo4j.ogm.session.SessionFactory sessionFactory)
Create a new
Neo4jHealthIndicator using the specified
SessionFactory . |
Modifier and Type | Method and Description |
---|---|
protected void |
doHealthCheck(Health.Builder builder)
Actual health check logic.
|
protected void |
extractResult(org.neo4j.ogm.session.Session session,
Health.Builder builder)
Provide health details using the specified
Session and Builder . |
health
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getHealth
public Neo4jHealthIndicator(org.neo4j.ogm.session.SessionFactory sessionFactory)
Neo4jHealthIndicator
using the specified
SessionFactory
.sessionFactory
- the SessionFactoryprotected void doHealthCheck(Health.Builder builder) throws Exception
AbstractHealthIndicator
doHealthCheck
in class AbstractHealthIndicator
builder
- the Health.Builder
to report health status and detailsException
- any Exception
that should create a Status.DOWN
system status.protected void extractResult(org.neo4j.ogm.session.Session session, Health.Builder builder) throws Exception
Session
and Builder
.session
- the session to use to execute a cypher statementbuilder
- the builder to add details toException
- if getting health details failedCopyright © 2021 Pivotal Software, Inc.. All rights reserved.