Class Expirable<V>
java.lang.Object
com.github.benmanes.caffeine.jcache.Expirable<V>
A value with an expiration timestamp.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionget()
Returns the value.long
Returns the time, in milliseconds, when the value will expire.boolean
hasExpired
(long currentTimeMS) Returns if the value has expired and is eligible for eviction.boolean
Returns if the value will never expire.void
setExpireTimeMS
(long expireTimeMS) Specifies the time, in milliseconds, when the value will expire.toString()
-
Field Details
-
value
-
expireTimeMS
private volatile long expireTimeMS
-
-
Constructor Details
-
Expirable
-
-
Method Details
-
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. -
toString
-