Class TrustedListenableFutureTask.TrustedFutureInterruptibleTask
- java.lang.Object
-
- java.util.concurrent.atomic.AtomicReference<java.lang.Runnable>
-
- com.google.common.util.concurrent.InterruptibleTask<V>
-
- com.google.common.util.concurrent.TrustedListenableFutureTask.TrustedFutureInterruptibleTask
-
- All Implemented Interfaces:
java.io.Serializable
,java.lang.Runnable
- Enclosing class:
- TrustedListenableFutureTask<V>
private final class TrustedListenableFutureTask.TrustedFutureInterruptibleTask extends InterruptibleTask<V>
-
-
Constructor Summary
Constructors Constructor Description TrustedFutureInterruptibleTask(java.util.concurrent.Callable<V> callable)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) void
afterRanInterruptibly(V result, java.lang.Throwable error)
Any interruption that happens as a result of calling interruptTask will arrive before this method is called.(package private) boolean
isDone()
Called before runInterruptibly - if true, runInterruptibly and afterRanInterruptibly will not be called.(package private) V
runInterruptibly()
Do interruptible work here - do not complete Futures here, as their listeners could be interrupted.(package private) java.lang.String
toPendingString()
-
Methods inherited from class com.google.common.util.concurrent.InterruptibleTask
interruptTask, run, toString
-
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, updateAndGet, weakCompareAndSet, weakCompareAndSetAcquire, weakCompareAndSetPlain, weakCompareAndSetRelease, weakCompareAndSetVolatile
-
-
-
-
Field Detail
-
callable
private final java.util.concurrent.Callable<V> callable
-
-
Constructor Detail
-
TrustedFutureInterruptibleTask
TrustedFutureInterruptibleTask(java.util.concurrent.Callable<V> callable)
-
-
Method Detail
-
isDone
final boolean isDone()
Description copied from class:InterruptibleTask
Called before runInterruptibly - if true, runInterruptibly and afterRanInterruptibly will not be called.- Specified by:
isDone
in classInterruptibleTask<V>
-
runInterruptibly
V runInterruptibly() throws java.lang.Exception
Description copied from class:InterruptibleTask
Do interruptible work here - do not complete Futures here, as their listeners could be interrupted.- Specified by:
runInterruptibly
in classInterruptibleTask<V>
- Throws:
java.lang.Exception
-
afterRanInterruptibly
void afterRanInterruptibly(V result, java.lang.Throwable error)
Description copied from class:InterruptibleTask
Any interruption that happens as a result of calling interruptTask will arrive before this method is called. Complete Futures here.- Specified by:
afterRanInterruptibly
in classInterruptibleTask<V>
-
toPendingString
java.lang.String toPendingString()
- Specified by:
toPendingString
in classInterruptibleTask<V>
-
-