类 Neo4jHealthIndicator
- java.lang.Object
- org.springframework.boot.actuate.health.AbstractHealthIndicator
- org.springframework.boot.actuate.neo4j.Neo4jHealthIndicator
- 所有已实现的接口:
HealthIndicator
public class Neo4jHealthIndicator extends AbstractHealthIndicator
HealthIndicator
that tests the status of a Neo4j by executing a Cypher statement.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 Neo4jHealthIndicator(org.neo4j.ogm.session.SessionFactory sessionFactory)
Create a newNeo4jHealthIndicator
using the specifiedSessionFactory
.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 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 specifiedSession
andBuilder
.从类继承的方法 org.springframework.boot.actuate.health.AbstractHealthIndicator
health
构造器详细资料
Neo4jHealthIndicator
public Neo4jHealthIndicator(org.neo4j.ogm.session.SessionFactory sessionFactory)
Create a newNeo4jHealthIndicator
using the specifiedSessionFactory
.- 参数:
sessionFactory
- the SessionFactory
方法详细资料
doHealthCheck
protected void doHealthCheck(Health.Builder builder) throws Exception
从类复制的说明:AbstractHealthIndicator
Actual health check logic.- 指定者:
doHealthCheck
在类中AbstractHealthIndicator
- 参数:
builder
- theHealth.Builder
to report health status and details- 抛出:
Exception
- anyException
that should create aStatus.DOWN
system status.
extractResult
protected void extractResult(org.neo4j.ogm.session.Session session, Health.Builder builder) throws Exception
Provide health details using the specifiedSession
andBuilder
.- 参数:
session
- the session to use to execute a cypher statementbuilder
- the builder to add details to- 抛出:
Exception
- if getting health details failed