Class WaitableResult<T>

  • All Implemented Interfaces:
    Waitable<T>

    class WaitableResult<T>
    extends java.lang.Object
    implements Waitable<T>
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.lang.RuntimeException exception  
      private boolean isDone  
      private T result  
    • Constructor Summary

      Constructors 
      Constructor Description
      WaitableResult()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) void complete​(T result)  
      (package private) void completeExceptionally​(java.lang.RuntimeException exception)  
      void dispose()  
      T get()  
      boolean isDone()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • result

        private T result
      • exception

        private java.lang.RuntimeException exception
      • isDone

        private boolean isDone
    • Constructor Detail

      • WaitableResult

        WaitableResult()
    • Method Detail

      • complete

        void complete​(T result)
      • completeExceptionally

        void completeExceptionally​(java.lang.RuntimeException exception)
      • isDone

        public boolean isDone()
        Specified by:
        isDone in interface Waitable<T>
      • get

        public T get()
        Specified by:
        get in interface Waitable<T>
      • dispose

        public void dispose()
        Specified by:
        dispose in interface Waitable<T>