Class 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).- Since:
- 2.0.0
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
Method Detail
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.- Parameters:
meterType
- the meter type- Returns:
- 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.- Parameters:
value
- the source value- Returns:
- a
ServiceLevelAgreementBoundary
instance
valueOf
public static ServiceLevelAgreementBoundary valueOf(String value)
Return a newServiceLevelAgreementBoundary
instance for the given String value.- Parameters:
value
- the source value- Returns:
- a
ServiceLevelAgreementBoundary
instance