public interface TaskStream<T> extends EventStream<javafx.concurrent.Task<T>>
| Modifier and Type | Method and Description |
|---|---|
default AwaitingEventStream<Try<T>> |
await()
Returns a new stream that emits the results of tasks emitted from this
stream when they become available.
|
default AwaitingEventStream<Try<T>> |
awaitLatest()
Similar to
await(), with one difference: for tasks t1 and
t2 emitted from this stream in this order, if t2 arrives
before t1 is completed, then t1 is cancelled and its result
is discarded (i.e. |
default AwaitingEventStream<Try<T>> |
awaitLatest(EventStream<?> canceller)
Similar to
awaitLatest(), with one addition:
When an event is emitted from canceller, if the task most
recently emitted from this stream has not yet completed, it is cancelled
and its result discarded (i.e. |
accumulate, accumulate, accumulate, accumulateBetween, accumulateBetween, accumulateUntilLater, accumulateUntilLater, accumulateUntilLater, accumulateUntilLater, accumulateWhen, accumulateWhen, accumulative, accumulative, cast, conditionOn, conditionOnShowing, distinct, emitBothOnEach, emitOn, emitOnEach, feedTo, feedTo, filter, filter, filterMap, filterMap, flatMap, forgetful, fork, guardedBy, hook, latestN, map, mapToCompletionStage, mapToTask, onRecurseAccumulate, onRecurseAccumulate, onRecurseQueue, onRecurseReduce, onRecurseRetainLatest, or, pausable, pauseWhen, pin, queueBetween, queueUntilLater, queueUntilLater, reduceBetween, reduceSuccessions, reduceSuccessions, reduceSuccessions, reduceSuccessions, reduceSuccessions, reduceSuccessions, reduceUntilLater, reduceUntilLater, reduceWhen, reducible, repeatOn, retainLatestBetween, retainLatestUntilLater, retainLatestUntilLater, retainLatestWhen, splitBy, subscribe, subscribeFor, subscribeForOne, successionEnds, successionEnds, supply, supply, supplyCompletionStage, supplyTask, suppressible, suppressWhen, suspenderOf, thenAccumulateFor, thenAccumulateFor, thenAccumulateFor, thenAccumulateFor, thenIgnoreFor, thenIgnoreFor, thenReduceFor, thenReduceFor, thenRetainLatestFor, thenRetainLatestFor, threadBridge, threadBridgeFromFx, threadBridgeToFx, toBinding, withDefaultEventaddObserver, observe, removeObserverdefault AwaitingEventStream<Try<T>> await()
Note that results from the returned stream may arrive in different order than the tasks emitted from this stream, due to asynchrony.
If a task emitted by this stream fails with exception e,
Try.failure(e) is emitted from the returned stream.
default AwaitingEventStream<Try<T>> awaitLatest()
await(), with one difference: for tasks t1 and
t2 emitted from this stream in this order, if t2 arrives
before t1 is completed, then t1 is cancelled and its result
is discarded (i.e. not emitted from the returned stream).await()default AwaitingEventStream<Try<T>> awaitLatest(EventStream<?> canceller)
awaitLatest(), with one addition:
When an event is emitted from canceller, if the task most
recently emitted from this stream has not yet completed, it is cancelled
and its result discarded (i.e. not emitted from the returned stream).canceller - An event from this stream causes the currently expected
result (if any) to be discarded. It can be used to signal that a new
task will arrive from this stream shortly, which makes the currently
expected result outdated.awaitLatest()