Class ExpirationManager.BaseExpiration<T>

java.lang.Object
com.illumon.iris.binarystore.ExpirationManager.BaseExpiration<T>
All Implemented Interfaces:
ExpirationManager<T>
Direct Known Subclasses:
ExpirationManager.ArbitraryExpiration, ExpirationManager.DailyExpiration, ExpirationManager.HourlyExpiration
Enclosing interface:
ExpirationManager<T>

public abstract static class ExpirationManager.BaseExpiration<T>
extends Object
implements ExpirationManager<T>
  • Constructor Details

  • Method Details

    • isExpired

      protected boolean isExpired​(long now)
    • get

      public T get​(long now)
      Description copied from interface: ExpirationManager
      Get the value of this ExpirationManager for the given time. It is assumed that times passed in will be monotonically increasing.
      Specified by:
      get in interface ExpirationManager<T>
      Parameters:
      now - the result of System.currentTimeInMillis.
      Returns:
      the value corresponding to the given time
    • doUpdate

      protected abstract String doUpdate​(long now)
    • setValue

      protected T setValue​(long expiration, T value)
    • get

      public T get()
      Description copied from interface: ExpirationManager
      Get the value of this ExpirationManager for the current time. Current time should be obtained from the appropriate time source, not necessarily System.currentTimeMillis.

      e.g ClockFactory.get().currentTimeMillis()

      Specified by:
      get in interface ExpirationManager<T>
      Returns:
      the value corresponding to timesource.currentTimeMillis()