Class Cache.Entries

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Runnable
    Enclosing class:
    Cache<E>

    private final class Cache.Entries
    extends java.util.concurrent.atomic.AtomicReference<java.util.List<E>>
    implements java.lang.Runnable
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.util.concurrent.ScheduledFuture<?> expirationFuture  
      private java.lang.String hostname  
    • Constructor Summary

      Constructors 
      Constructor Description
      Entries​(java.lang.String hostname)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void add​(E e, int ttl, EventLoop loop)  
      (package private) boolean clearAndCancel()  
      void run()  
      private void scheduleCacheExpirationIfNeeded​(int ttl, EventLoop loop)  
      • Methods inherited from class java.util.concurrent.atomic.AtomicReference

        accumulateAndGet, compareAndExchange, compareAndExchangeAcquire, compareAndExchangeRelease, compareAndSet, get, getAcquire, getAndAccumulate, getAndSet, getAndUpdate, getOpaque, getPlain, lazySet, set, setOpaque, setPlain, setRelease, toString, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • hostname

        private final java.lang.String hostname
      • expirationFuture

        volatile java.util.concurrent.ScheduledFuture<?> expirationFuture
    • Constructor Detail

      • Entries

        Entries​(java.lang.String hostname)
    • Method Detail

      • add

        void add​(E e,
                 int ttl,
                 EventLoop loop)
      • scheduleCacheExpirationIfNeeded

        private void scheduleCacheExpirationIfNeeded​(int ttl,
                                                     EventLoop loop)
      • clearAndCancel

        boolean clearAndCancel()
      • run

        public void run()
        Specified by:
        run in interface java.lang.Runnable