Class TestEnvironment.Promise<T>

  • Enclosing class:
    TestEnvironment

    public static class TestEnvironment.Promise<T>
    extends java.lang.Object
    • Field Detail

      • abq

        private java.util.concurrent.ArrayBlockingQueue<T> abq
      • _value

        private java.util.concurrent.atomic.AtomicReference<T> _value
    • Method Detail

      • value

        public T value()
      • isCompleted

        public boolean isCompleted()
      • complete

        public void complete​(T value)
        Allows using expectCompletion to await for completion of the value and complete it _then_
      • completeImmediatly

        public void completeImmediatly​(T value)
        Same as complete. Keeping this method for binary compatibility.
      • expectCompletion

        public void expectCompletion​(long timeoutMillis,
                                     java.lang.String errorMsg)
                              throws java.lang.InterruptedException
        Throws:
        java.lang.InterruptedException