Class TrustedListenableFutureTask.TrustedFutureInterruptibleTask

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

    private final class TrustedListenableFutureTask.TrustedFutureInterruptibleTask
    extends InterruptibleTask<V>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.concurrent.Callable<V> callable  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void afterRanInterruptiblyFailure​(java.lang.Throwable error)
      Any interruption that happens as a result of calling interruptTask will arrive before this method is called.
      (package private) void afterRanInterruptiblySuccess​(V result)
      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 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
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • 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 class InterruptibleTask<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 class InterruptibleTask<V>
        Throws:
        java.lang.Exception
      • afterRanInterruptiblySuccess

        void afterRanInterruptiblySuccess​(V result)
        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:
        afterRanInterruptiblySuccess in class InterruptibleTask<V>
      • afterRanInterruptiblyFailure

        void afterRanInterruptiblyFailure​(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:
        afterRanInterruptiblyFailure in class InterruptibleTask<V>