Package com.illumon.iris.binarystore
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>
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.illumon.iris.binarystore.ExpirationManager
ExpirationManager.ArbitraryExpiration, ExpirationManager.BaseExpiration<T>, ExpirationManager.DailyExpiration, ExpirationManager.DailyHourlyExpiration, ExpirationManager.HourlyExpiration, ExpirationManager.StaticExpiration<T> -
Constructor Summary
Constructors Constructor Description BaseExpiration() -
Method Summary
Modifier and Type Method Description protected abstract StringdoUpdate(long now)Tget()Get the value of this ExpirationManager for the current time.Tget(long now)Get the value of this ExpirationManager for the given time.protected booleanisExpired(long now)protected TsetValue(long expiration, T value)Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.illumon.iris.binarystore.ExpirationManager
initialize, initialize
-
Constructor Details
-
BaseExpiration
public BaseExpiration()
-
-
Method Details
-
isExpired
protected boolean isExpired(long now) -
get
Description copied from interface:ExpirationManagerGet the value of this ExpirationManager for the given time. It is assumed that times passed in will be monotonically increasing.- Specified by:
getin interfaceExpirationManager<T>- Parameters:
now- the result of System.currentTimeInMillis.- Returns:
- the value corresponding to the given time
-
doUpdate
-
setValue
-
get
Description copied from interface:ExpirationManagerGet 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:
getin interfaceExpirationManager<T>- Returns:
- the value corresponding to timesource.currentTimeMillis()
-