Class ServiceLevelAgreementBoundary
- java.lang.Object
-
- io.micrometer.spring.autoconfigure.ServiceLevelAgreementBoundary
-
public final class ServiceLevelAgreementBoundary extends java.lang.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).
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.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(java.lang.String value)
Return a newServiceLevelAgreementBoundary
instance for the given long value.
-
-
-
Method Detail
-
getValue
public java.lang.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(java.lang.String value)
Return a newServiceLevelAgreementBoundary
instance for the given long value.- Parameters:
value
- the source value- Returns:
- a
ServiceLevelAgreementBoundary
instance
-
-