Package com.illumon.iris.binarystore
Class HourlyExpiration
- All Implemented Interfaces:
ExpirationManager<String>
Expires on the hour with a datetime format of "yyyy-MM-dd.HHmmss.SSSZ". Acts as a high-watermark cache of
BinaryLogFilename.trailingFormat(ZonedDateTime).-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.binarystore.ExpirationManager
ExpirationManager.StaticExpiration<T> -
Constructor Summary
ConstructorsConstructorDescriptionHourlyExpiration(ZoneId zoneId) The current interval is determined by the current time rounded to the given rollIntervalMillis, and the current value will be expired when the interval changes. -
Method Summary
Modifier and TypeMethodDescriptionprotected StringdoUpdate(long now) Called byBaseExpiration.get(long)when the value is expired.initialize(long now) The value for the given time, assuming it is the first access.Methods inherited from class com.illumon.iris.binarystore.BaseExpiration
get, isExpired, setValue
-
Constructor Details
-
HourlyExpiration
The current interval is determined by the current time rounded to the given rollIntervalMillis, and the current value will be expired when the interval changes. The value during the initial interval and after an initialize call will not be rounded.
-
-
Method Details
-
doUpdate
Description copied from class:BaseExpirationCalled byBaseExpiration.get(long)when the value is expired. This method is expected to callBaseExpiration.setValue(long, Object)- Specified by:
doUpdatein classBaseExpiration<String>- Parameters:
now- the current time since the epoch in millis- Returns:
- the new value
-
initialize
Description copied from interface:ExpirationManagerThe value for the given time, assuming it is the first access. Certain implementations generate different values for the initialized time vs. after an expiration.- Parameters:
now- the result of System.currentTimeInMillis.- Returns:
- the value corresponding to the given initialization time
-