Package com.illumon.iris.binarystore
Class DayAndHourExpiration
java.lang.Object
com.illumon.iris.binarystore.BaseExpiration<DayAndHourExpiration.DateAndHour>
com.illumon.iris.binarystore.DayAndHourExpiration
- All Implemented Interfaces:
ExpirationManager<DayAndHourExpiration.DateAndHour>
@InternalUseOnly
public class DayAndHourExpiration
extends BaseExpiration<DayAndHourExpiration.DateAndHour>
Expires on the hour, returning a datetime format of "yyyy-MM-dd.HHmmss.SSSZ" after rolling on the hour. Acts as a
high-watermark cache of
BinaryLogFilename.localDateColumnPartition(ZonedDateTime) and
BinaryLogFilename.trailingFormat(ZonedDateTime).-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceThe value contained in this object contains both the date and the hour.Nested classes/interfaces inherited from interface com.illumon.iris.binarystore.ExpirationManager
ExpirationManager.StaticExpiration<T> -
Constructor Summary
ConstructorsConstructorDescriptionDayAndHourExpiration(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 DayAndHourExpiration.DateAndHourdoUpdate(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
-
DayAndHourExpiration
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<DayAndHourExpiration.DateAndHour>- 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
-