Package org.reactfx

Class AwaitLatest<T,​F>

    • Field Detail

      • cancelImpulse

        private final EventStream<?> cancelImpulse
      • canceller

        private final java.util.function.Consumer<F> canceller
      • addCompletionHandler

        private final java.util.function.BiConsumer<F,​TriConsumer<T,​java.lang.Throwable,​java.lang.Boolean>> addCompletionHandler
      • revision

        private long revision
      • expectedFuture

        private F expectedFuture
      • pending

        private javafx.beans.binding.BooleanBinding pending
    • Constructor Detail

      • AwaitLatest

        private AwaitLatest​(EventStream<F> source,
                            EventStream<?> cancelImpulse,
                            java.util.function.Consumer<F> canceller,
                            java.util.function.BiConsumer<F,​TriConsumer<T,​java.lang.Throwable,​java.lang.Boolean>> addCompletionHandler)
    • Method Detail

      • awaitCompletionStage

        public static <T> AwaitingEventStream<Try<T>> awaitCompletionStage​(EventStream<java.util.concurrent.CompletionStage<T>> source,
                                                                           java.util.concurrent.Executor clientThreadExecutor)
      • awaitCompletionStage

        public static <T> AwaitingEventStream<Try<T>> awaitCompletionStage​(EventStream<java.util.concurrent.CompletionStage<T>> source,
                                                                           EventStream<?> cancelImpulse,
                                                                           java.util.concurrent.Executor clientThreadExecutor)
      • pendingProperty

        public javafx.beans.value.ObservableBooleanValue pendingProperty()
        Description copied from interface: AwaitingEventStream
        Indicates whether there is a pending event that will be emitted by this stream in the (near) future. This may mean that an event has occurred that causes this stream to emit an event with some delay, e.g. waiting for a timer or completion of an asynchronous task.
        Specified by:
        pendingProperty in interface AwaitingEventStream<T>
      • observeInputs

        protected Subscription observeInputs()
        Description copied from class: ObservableBase
        Starts observing this observable's input(s), if any. This method is called when the number of observers goes from 0 to 1. This method is called before ObservableBase.newObserver(Object) is called for the first observer.
        Specified by:
        observeInputs in class ObservableBase<java.util.function.Consumer<? super Try<T>>,​Try<T>>
        Returns:
        subscription used to stop observing inputs. The subscription is unsubscribed (i.e. input observation stops) when the number of observers goes down to 0.
      • replaceExpected

        private final long replaceExpected​(F newExpected)
      • setExpected

        private void setExpected​(F newExpected)