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>

public static class AsyncLoadingCache.TimedObject<U> extends Object
Class for returned an expiry value along with the cache value.
  • Constructor Details

    • TimedObject

      public TimedObject(U value, long expiryMS)
      Constructor.
      Parameters:
      value - The value being held.
      expiryMS - The time that the value should be held.
  • Method Details

    • getValue

      public U 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.