Class FutureMultiObserver<T>

    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) java.lang.Throwable error  
      (package private) java.util.concurrent.atomic.AtomicReference<Disposable> upstream  
      (package private) T value  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean cancel​(boolean mayInterruptIfRunning)  
      void dispose()
      Dispose the resource, the operation should be idempotent.
      T get()  
      T get​(long timeout, @NonNull java.util.concurrent.TimeUnit unit)  
      boolean isCancelled()  
      boolean isDisposed()
      Returns true if this resource has been disposed.
      boolean isDone()  
      void onComplete()
      Called once the deferred computation completes normally.
      void onError​(java.lang.Throwable t)
      Notifies the MaybeObserver that the Maybe has experienced an error condition.
      void onSubscribe​(Disposable d)
      Provides the MaybeObserver with the means of cancelling (disposing) the connection (channel) with the Maybe in both synchronous (from within onSubscribe(Disposable) itself) and asynchronous manner.
      void onSuccess​(T t)
      Notifies the MaybeObserver with one item and that the Maybe has finished sending push-based notifications.
      • Methods inherited from class java.util.concurrent.CountDownLatch

        await, await, countDown, getCount, toString
      • Methods inherited from class java.lang.Object

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

      • value

        T value
      • error

        java.lang.Throwable error
      • upstream

        final java.util.concurrent.atomic.AtomicReference<Disposable> upstream
    • Constructor Detail

      • FutureMultiObserver

        public FutureMultiObserver()
    • Method Detail

      • cancel

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

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

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

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

        public T get​(long timeout,
                     @NonNull
                     @NonNull 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<T>
        Throws:
        java.lang.InterruptedException
        java.util.concurrent.ExecutionException
        java.util.concurrent.TimeoutException
      • dispose

        public void dispose()
        Description copied from interface: Disposable
        Dispose the resource, the operation should be idempotent.
        Specified by:
        dispose in interface Disposable
      • isDisposed

        public boolean isDisposed()
        Description copied from interface: Disposable
        Returns true if this resource has been disposed.
        Specified by:
        isDisposed in interface Disposable
        Returns:
        true if this resource has been disposed