Package org.minidns

Class MiniDnsFuture<V,​E extends java.lang.Exception>

    • Field Detail

      • exception

        protected E extends java.lang.Exception exception
    • Method Detail

      • cancel

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

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

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

        public final boolean hasResult()
      • get

        public final 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
      • getOrThrow

        public final V getOrThrow()
                           throws E extends java.lang.Exception
        Throws:
        E extends java.lang.Exception
      • get

        public final V get​(long timeout,
                           java.util.concurrent.TimeUnit unit)
                    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
      • from

        public static <V,​E extends java.lang.Exception> MiniDnsFuture<V,​E> from​(V result)