Class GuavaCacheLazyExpiryHandler

  • All Implemented Interfaces:
    ExpiryHandler

    public class GuavaCacheLazyExpiryHandler
    extends LazyExpiryHandler
    Expirable guava caches are expired on access. This handler can be used to trigger expiry.
    • Constructor Detail

      • GuavaCacheLazyExpiryHandler

        public GuavaCacheLazyExpiryHandler​(com.google.common.cache.Cache<?,​?> cache)
    • Method Detail

      • expiryTick

        public long expiryTick()
        Description copied from interface: ExpiryHandler
        Called periodically by ExpiryTicker. Should be used to expire the object if it's too old.
        Returns:
        -1 if the object has been expired. 0 if it has not been expired. Optionally, can return the nearest timestamp when the object may be expired.