Package ch.qos.logback.core.util
Class Duration
- java.lang.Object
-
- ch.qos.logback.core.util.Duration
-
@Deprecated(since="2022-01-27") public class Duration extends java.lang.Object
Deprecated.This internal logback API is not supported by AEM as a Cloud Service.Duration instances represent a lapse of time. Internally, the duration is stored in milliseconds. However, whenever a parameter of type Duration is expected, Joran (logback's configuration system) will automatically convert strings such as "20 seconds" "3.5 minutes" or "5 hours" into Duration instances.The recognized units of time are the "millisecond", "second", "minute" "hour" and "day". The unit name may be followed by an "s". Thus, "2 day" and "2 days" are equivalent. In the absence of a time unit specification, milliseconds are assumed.
Note: the conversion magic is entirely due to the fact that this class follows the
valueOf(java.lang.String)
convention.
-
-
Constructor Summary
Constructors Constructor Description Duration(long millis)
Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static Duration
buildByDays(double value)
Deprecated.static Duration
buildByHours(double value)
Deprecated.static Duration
buildByMilliseconds(double value)
Deprecated.static Duration
buildByMinutes(double value)
Deprecated.static Duration
buildBySeconds(double value)
Deprecated.static Duration
buildUnbounded()
Deprecated.long
getMilliseconds()
Deprecated.java.lang.String
toString()
Deprecated.static Duration
valueOf(java.lang.String durationStr)
Deprecated.
-
-
-
Method Detail
-
buildByMilliseconds
public static Duration buildByMilliseconds(double value)
Deprecated.
-
buildBySeconds
public static Duration buildBySeconds(double value)
Deprecated.
-
buildByMinutes
public static Duration buildByMinutes(double value)
Deprecated.
-
buildByHours
public static Duration buildByHours(double value)
Deprecated.
-
buildByDays
public static Duration buildByDays(double value)
Deprecated.
-
buildUnbounded
public static Duration buildUnbounded()
Deprecated.
-
getMilliseconds
public long getMilliseconds()
Deprecated.
-
valueOf
public static Duration valueOf(java.lang.String durationStr)
Deprecated.
-
toString
public java.lang.String toString()
Deprecated.- Overrides:
toString
in classjava.lang.Object
-
-