Class CompletableTask<V>

  • All Implemented Interfaces:
    ITask<V>, java.util.concurrent.Callable<V>, java.util.concurrent.Future<V>
    Direct Known Subclasses:
    CountingTask, NullCompletableTask

    public class CompletableTask<V>
    extends java.lang.Object
    implements ITask<V>
    • Constructor Detail

      • CompletableTask

        public CompletableTask()
    • Method Detail

      • getCallable

        public java.util.concurrent.Callable<V> getCallable()
        Specified by:
        getCallable in interface ITask<V>
      • getDef

        public V getDef​(V def)
        Specified by:
        getDef in interface ITask<V>
      • get

        public V get​(long time,
                     java.util.concurrent.TimeUnit timeUnit,
                     V def)
        Specified by:
        get in interface ITask<V>
      • fail

        public void fail​(java.lang.Throwable throwable)
      • call

        public V call()
        Specified by:
        call in interface java.util.concurrent.Callable<V>
      • complete

        public void complete​(V value)
      • cancel

        public boolean cancel​(boolean b)
        Specified by:
        cancel in interface java.util.concurrent.Future<V>
      • isCancelled

        public boolean isCancelled()
        Specified by:
        isCancelled in interface java.util.concurrent.Future<V>
      • isDone

        public boolean isDone()
        Specified by:
        isDone in interface java.util.concurrent.Future<V>
      • get

        public V get()
              throws java.lang.InterruptedException,
                     java.util.concurrent.ExecutionException
        Specified by:
        get in interface java.util.concurrent.Future<V>
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
      • get

        public V get​(long l,
                     @NotNull
                     @NotNull java.util.concurrent.TimeUnit timeUnit)
              throws java.lang.InterruptedException,
                     java.util.concurrent.ExecutionException,
                     java.util.concurrent.TimeoutException
        Specified by:
        get in interface java.util.concurrent.Future<V>
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
        java.util.concurrent.TimeoutException