Package io.netty.resolver.dns
Class Cache.Entries
- java.lang.Object
-
- java.util.concurrent.atomic.AtomicReference<java.util.List<E>>
-
- io.netty.resolver.dns.Cache.Entries
-
- All Implemented Interfaces:
FutureListener<java.lang.Object>,GenericFutureListener<Future<java.lang.Object>>,java.io.Serializable,java.lang.Runnable,java.util.EventListener
private final class Cache.Entries extends java.util.concurrent.atomic.AtomicReference<java.util.List<E>> implements java.lang.Runnable, FutureListener<java.lang.Object>
-
-
Field Summary
Fields Modifier and Type Field Description (package private) java.util.concurrent.ScheduledFuture<?>expirationFutureprivate java.lang.Stringhostname
-
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) voidadd(E e, int ttl, EventLoop loop)(package private) booleanclearAndCancel()voidoperationComplete(Future<java.lang.Object> future)Invoked when the operation associated with theFuturehas been completed.private voidremoveIfCancelled(java.util.concurrent.ScheduledFuture<?> future)voidrun()private voidscheduleCacheExpirationIfNeeded(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
-
-
-
-
Method Detail
-
scheduleCacheExpirationIfNeeded
private void scheduleCacheExpirationIfNeeded(int ttl, EventLoop loop)
-
operationComplete
public void operationComplete(Future<java.lang.Object> future)
Description copied from interface:GenericFutureListenerInvoked when the operation associated with theFuturehas been completed.- Specified by:
operationCompletein interfaceGenericFutureListener<Future<java.lang.Object>>- Parameters:
future- the sourceFuturewhich called this callback
-
removeIfCancelled
private void removeIfCancelled(java.util.concurrent.ScheduledFuture<?> future)
-
clearAndCancel
boolean clearAndCancel()
-
run
public void run()
- Specified by:
runin interfacejava.lang.Runnable
-
-