类 DiskSpaceHealthIndicator
- java.lang.Object
- org.springframework.boot.actuate.health.AbstractHealthIndicator
- org.springframework.boot.actuate.system.DiskSpaceHealthIndicator
- 所有已实现的接口:
HealthIndicator
public class DiskSpaceHealthIndicator extends AbstractHealthIndicator
AHealthIndicator
that checks available disk space and reports a status ofStatus.DOWN
when it drops below a configurable threshold.- 从以下版本开始:
- 2.0.0
构造器概要
构造器 构造器 说明 DiskSpaceHealthIndicator(File path, long threshold)
已过时。since 2.1.0 in favor ofDiskSpaceHealthIndicator(File, DataSize)
DiskSpaceHealthIndicator(File path, org.springframework.util.unit.DataSize threshold)
Create a newDiskSpaceHealthIndicator
instance.
构造器详细资料
DiskSpaceHealthIndicator
public DiskSpaceHealthIndicator(File path, org.springframework.util.unit.DataSize threshold)
Create a newDiskSpaceHealthIndicator
instance.- 参数:
path
- the Path used to compute the available disk spacethreshold
- the minimum disk space that should be available
DiskSpaceHealthIndicator
@Deprecated public DiskSpaceHealthIndicator(File path, long threshold)
已过时。since 2.1.0 in favor ofDiskSpaceHealthIndicator(File, DataSize)
Create a newDiskSpaceHealthIndicator
instance.- 参数:
path
- the Path used to compute the available disk spacethreshold
- the minimum disk space that should be available (in bytes)
方法详细资料
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.