Class HourlyExpiration

java.lang.Object
com.illumon.iris.binarystore.BaseExpiration<String>
com.illumon.iris.binarystore.HourlyExpiration
All Implemented Interfaces:
ExpirationManager<String>

@InternalUseOnly public class HourlyExpiration extends BaseExpiration<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).
  • Constructor Details

    • HourlyExpiration

      public HourlyExpiration(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. The value during the initial interval and after an initialize call will not be rounded.
  • Method Details

    • doUpdate

      protected String doUpdate(long now)
      Description copied from class: BaseExpiration
      Called by BaseExpiration.get(long) when the value is expired. This method is expected to call BaseExpiration.setValue(long, Object)
      Specified by:
      doUpdate in class BaseExpiration<String>
      Parameters:
      now - the current time since the epoch in millis
      Returns:
      the new value
    • initialize

      public String initialize(long now)
      Description copied from interface: ExpirationManager
      The 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