Interface ExpiryTimeValues

    • Field Summary

      Fields 
      Modifier and Type Field Description
      static long ETERNAL
      Return value signalling to keep the value forever in the cache, switching off expiry.
      static long NEUTRAL
      Don't change the expiry of the entry.
      static long NOW
      The value expires immediately and will not be cached.
      static long REFRESH
      Expires the entry and starts a refresh if Cache2kBuilder.refreshAhead(boolean) is enabled.
    • Field Detail

      • NOW

        static final long NOW
        The value expires immediately and will not be cached. No refreshing is started.
        See Also:
        Constant Field Values
      • REFRESH

        static final long REFRESH
        Expires the entry and starts a refresh if Cache2kBuilder.refreshAhead(boolean) is enabled. With a positive value the current value is visible until the refresh is complete. With a negative value a get() requests will block until the refreshed value is available.

        Rationale: Any value in the past does and between the current time, does the same as if the time is reached just now.

        See Also:
        Constant Field Values
      • ETERNAL

        static final long ETERNAL
        Return value signalling to keep the value forever in the cache, switching off expiry. If the cache has a static expiry time configured, then this is used instead.
        See Also:
        Constant Field Values