类 HealthEndpoint
- java.lang.Object
- org.springframework.boot.actuate.endpoint.AbstractEndpoint<Health>
- org.springframework.boot.actuate.endpoint.HealthEndpoint
- 所有已实现的接口:
org.springframework.beans.factory.Aware
,Endpoint<Health>
,org.springframework.context.EnvironmentAware
@ConfigurationProperties(prefix="endpoints.health") public class HealthEndpoint extends AbstractEndpoint<Health>
Endpoint
to expose application health.
构造器概要
构造器 构造器 说明 HealthEndpoint(HealthAggregator healthAggregator, Map<String,HealthIndicator> healthIndicators)
Create a newHealthEndpoint
instance.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 long
getTimeToLive()
Time to live for cached result.Health
invoke()
Invoke allHealthIndicator
delegates and collect their health information.void
setTimeToLive(long timeToLive)
Set the time to live for cached results.从类继承的方法 org.springframework.boot.actuate.endpoint.AbstractEndpoint
getEnvironment, getId, isEnabled, isSensitive, setEnabled, setEnvironment, setId, setSensitive
构造器详细资料
HealthEndpoint
public HealthEndpoint(HealthAggregator healthAggregator, Map<String,HealthIndicator> healthIndicators)
Create a newHealthEndpoint
instance.- 参数:
healthAggregator
- the health aggregatorhealthIndicators
- the health indicators
方法详细资料
getTimeToLive
public long getTimeToLive()
Time to live for cached result. This is particularly useful to cache the result of this endpoint to prevent a DOS attack if it is accessed anonymously.- 返回:
- time to live in milliseconds (default 1000)
setTimeToLive
public void setTimeToLive(long timeToLive)
Set the time to live for cached results.- 参数:
timeToLive
- the time to live in milliseconds
invoke
public Health invoke()
Invoke allHealthIndicator
delegates and collect their health information.- 返回:
- the results of the invocation