private static final class Futures.NonCancellationPropagatingFuture<V> extends AbstractFuture.TrustedFuture<V> implements java.lang.Runnable
AbstractFuture.TrustedFuture<V>
Modifier and Type | Field and Description |
---|---|
private ListenableFuture<V> |
delegate |
Constructor and Description |
---|
NonCancellationPropagatingFuture(ListenableFuture<V> delegate) |
Modifier and Type | Method and Description |
---|---|
protected void |
afterDone()
Callback method that is called exactly once after the future is completed.
|
protected java.lang.String |
pendingToString()
Provide a human-readable explanation of why this future has not yet completed.
|
void |
run() |
addListener, cancel, get, get, isCancelled, isDone
interruptTask, maybePropagateCancellationTo, set, setException, setFuture, toString, trustedGetException, wasInterrupted
addCallback, catching, catchingAsync, from, transform, transformAsync, withTimeout
private ListenableFuture<V> delegate
NonCancellationPropagatingFuture(ListenableFuture<V> delegate)
public void run()
run
in interface java.lang.Runnable
protected java.lang.String pendingToString()
AbstractFuture
pendingToString
in class AbstractFuture<V>
protected void afterDone()
AbstractFuture
If AbstractFuture.interruptTask()
is also run during completion, AbstractFuture.afterDone()
runs after it.
The default implementation of this method in AbstractFuture
does nothing. This is
intended for very lightweight cleanup work, for example, timing statistics or clearing fields.
If your task does anything heavier consider, just using a listener with an executor.
afterDone
in class AbstractFuture<V>