Package org.elasticsearch.common
Interface Rounding.Prepared
- Enclosing class:
- Rounding
public static interface Rounding.Prepared
A strategy for rounding milliseconds since epoch.
-
Method Summary
Modifier and Type Method Description long
nextRoundingValue(long utcMillis)
Given the rounded value (which was potentially generated byround(long)
, returns the next rounding value.long
round(long utcMillis)
Rounds the given value.double
roundingSize(long utcMillis, Rounding.DateTimeUnit timeUnit)
Given the rounded value, returns the size between this value and the next rounded value in specified units if possible.
-
Method Details
-
round
long round(long utcMillis)Rounds the given value. -
nextRoundingValue
long nextRoundingValue(long utcMillis)Given the rounded value (which was potentially generated byround(long)
, returns the next rounding value. For example, with interval based rounding, if the interval is 3,nextRoundValue(6) = 9
. -
roundingSize
Given the rounded value, returns the size between this value and the next rounded value in specified units if possible.
-