Class Expirable<V>
- java.lang.Object
-
- com.github.benmanes.caffeine.jcache.Expirable<V>
-
public final class Expirable<V> extends Object
A value with an expiration timestamp.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Vget()Returns the value.longgetExpireTimeMS()Returns the time, in milliseconds, when the value will expire.booleanhasExpired(long currentTimeMS)Returns if the value has expired and is eligible for eviction.booleanisEternal()Returns if the value will never expire.voidsetExpireTimeMS(long expireTimeMS)Specifies the time, in milliseconds, when the value will expire.StringtoString()
-
-
-
Constructor Detail
-
Expirable
public Expirable(V value, long expireTimeMS)
-
-
Method Detail
-
get
public V get()
Returns the value.
-
getExpireTimeMS
public long getExpireTimeMS()
Returns the time, in milliseconds, when the value will expire.
-
setExpireTimeMS
public void setExpireTimeMS(long expireTimeMS)
Specifies the time, in milliseconds, when the value will expire.
-
hasExpired
public boolean hasExpired(long currentTimeMS)
Returns if the value has expired and is eligible for eviction.
-
isEternal
public boolean isEternal()
Returns if the value will never expire.
-
-