类 ServiceLevelAgreementBoundary
- java.lang.Object
- org.springframework.boot.actuate.autoconfigure.metrics.ServiceLevelAgreementBoundary
public final class ServiceLevelAgreementBoundary extends Object
A service level agreement boundary for use when configuring Micrometer. Can be specified as either aLong
(applicable to timers and distribution summaries) or aDuration
(applicable to only timers).- 从以下版本开始:
- 2.0.0
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 Long
getValue(io.micrometer.core.instrument.Meter.Type meterType)
Return the underlying value of the SLA in form suitable to apply to the given meter type.static ServiceLevelAgreementBoundary
valueOf(long value)
Return a newServiceLevelAgreementBoundary
instance for the given long value.static ServiceLevelAgreementBoundary
valueOf(String value)
Return a newServiceLevelAgreementBoundary
instance for the given String value.
方法详细资料
getValue
public Long getValue(io.micrometer.core.instrument.Meter.Type meterType)
Return the underlying value of the SLA in form suitable to apply to the given meter type.- 参数:
meterType
- the meter type- 返回:
- the value or
null
if the value cannot be applied
valueOf
public static ServiceLevelAgreementBoundary valueOf(long value)
Return a newServiceLevelAgreementBoundary
instance for the given long value.- 参数:
value
- the source value- 返回:
- a
ServiceLevelAgreementBoundary
instance
valueOf
public static ServiceLevelAgreementBoundary valueOf(String value)
Return a newServiceLevelAgreementBoundary
instance for the given String value.- 参数:
value
- the source value- 返回:
- a
ServiceLevelAgreementBoundary
instance