Class AsyncLoadingCache.TimedObject<U>
java.lang.Object
uk.co.spudsoft.jwtvalidatorvertx.impl.AsyncLoadingCache.TimedObject<U>
- Type Parameters:
U- The type of object being stored.
- Enclosing class:
AsyncLoadingCache<K,V>
Class for returned an expiry value along with the cache value.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanexpiredBefore(long nowMs) Return true if the value has expired.longGet the expiry time, in ms since epoch.getValue()Get the value.
-
Constructor Details
-
TimedObject
Constructor. Note that expiryMs is an absolute time (ms since epoch) and not an offset.- Parameters:
value- The value being held.expiryMS- The time that the value should be held.
-
-
Method Details
-
getValue
Get the value.- Returns:
- the value.
-
getExpiryMs
public long getExpiryMs()Get the expiry time, in ms since epoch.- Returns:
- the xpiry time, in ms since epoch.
-
expiredBefore
public boolean expiredBefore(long nowMs) Return true if the value has expired.- Parameters:
nowMs- The time now, in ms since epoch.- Returns:
- true if the value has expired.
-