Class Expirable<V>
java.lang.Object
com.github.benmanes.caffeine.jcache.Expirable<V>
A value with an expiration timestamp.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()Returns the value.longReturns the time, in milliseconds, when the value will expire.booleanhasExpired(long currentTimeMillis) Returns if the value has expired and is eligible for eviction.booleanReturns if the value will never expire.voidsetExpireTimeMillis(long expireTimeMillis) Specifies the time, in milliseconds, when the value will expire.toString()
-
Constructor Details
-
Expirable
-
-
Method Details
-
get
Returns the value. -
getExpireTimeMillis
public long getExpireTimeMillis()Returns the time, in milliseconds, when the value will expire. -
setExpireTimeMillis
public void setExpireTimeMillis(long expireTimeMillis) Specifies the time, in milliseconds, when the value will expire. -
hasExpired
public boolean hasExpired(long currentTimeMillis) Returns if the value has expired and is eligible for eviction. -
isEternal
public boolean isEternal()Returns if the value will never expire. -
toString
-