public interface SimpleReactStream<U> extends BaseSimpleReactStream<U>, BlockingStream<U>, ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>, ToQueue<U>
Modifier and Type | Method and Description |
---|---|
default <T,R> SimpleReactStream<R> |
allOf(java.util.stream.Collector collector,
java.util.function.Function<T,R> fn) |
default <T,R> SimpleReactStream<R> |
allOf(java.util.function.Function<java.util.List<T>,R> fn)
React and allOf
allOf is a non-blocking equivalent of block.
|
default <R> SimpleReactStream<R> |
anyOf(java.util.function.Function<U,R> fn)
React to the completion of any of the events in the previous stage.
|
static SimpleReactFailedStageException |
assureSimpleReactException(java.lang.Throwable throwable) |
default SimpleReactStream<U> |
async() |
static <U,R> SimpleReactStream<R> |
bind(SimpleReactStream<U> stream,
java.util.function.Function<U,BaseSimpleReactStream<R>> flatFn)
flatMap / bind implementation that returns the correct type (SimpleReactStream)
|
default <R> R |
block(java.util.stream.Collector collector,
java.util.function.Predicate<Status> breakout) |
default java.util.List<U> |
block(java.util.function.Predicate<Status> breakout)
React and block with breakout
Sometimes you may not need to block until all the work is complete, one
result or a subset may be enough.
|
default void |
cancel()
Cancel the CompletableFutures in this stage of the stream
|
default SimpleReactStream<U> |
capture(java.util.function.Consumer<? extends java.lang.Throwable> errorHandler)
React capture
While onFail is used for disaster recovery (when it is possible to
recover) - capture is used to capture those occasions where the full
pipeline has failed and is unrecoverable.
|
default <T2> org.jooq.lambda.Seq<org.jooq.lambda.tuple.Tuple2<U,T2>> |
combineLatest(SimpleReactStream<T2> right) |
default LazyFutureStream<U> |
convertToLazyStream()
Convert between an Lazy and Eager future stream,
can be used to take advantages of each approach during a single Stream
|
default java.util.List<SimpleReactStream<U>> |
copySimpleReactStream(int times) |
default SimpleReactStream<U> |
doOnEach(java.util.function.Function<U,U> fn)
Applies a function to this phase independent on the main flow.
|
default SimpleReactStream<U> |
doOnEachSync(java.util.function.Function<U,U> fn)
Applies a function to this phase independent on the main flow, continues on the currently executing thread.
|
default org.jooq.lambda.tuple.Tuple2<SimpleReactStream<U>,SimpleReactStream<U>> |
duplicate()
Duplicate a Stream into two equivalent LazyFutureStreams, underlying
Stream of Futures is duplicated
|
default SimpleReactStream<U> |
filter(java.util.function.Predicate<? super U> p)
Removes elements that do not match the supplied predicate from the
dataflow
|
default SimpleReactStream<U> |
filterSync(java.util.function.Predicate<? super U> p)
Synchronous filtering operation
Removes elements that do not match the supplied predicate from the
dataflow
|
static <U> SimpleReactStream<U> |
firstOf(SimpleReactStream<U>... futureStreams)
Return first Stream out of provided Streams that starts emitted results
|
default <R> SimpleReactStream<R> |
flatMap(java.util.function.Function<? super U,? extends java.util.stream.Stream<? extends R>> flatFn)
Allows aggregate values in a Stream to be flatten into a single Stream.
|
default <R> SimpleReactStream<R> |
flatMapToCompletableFuture(java.util.function.Function<U,java.util.concurrent.CompletableFuture<R>> flatFn)
Perform a flatMap operation where the CompletableFuture type returned is flattened from the resulting Stream
If in async mode this operation is performed asyncrhonously
If in sync mode this operation is performed synchronously
|
default <R> SimpleReactStream<R> |
flatMapToCompletableFutureSync(java.util.function.Function<U,java.util.concurrent.CompletableFuture<R>> flatFn)
Perform a flatMap operation where the CompletableFuture type returned is flattened from the resulting Stream
This operation is performed synchronously
|
default <R> SimpleReactStream<R> |
fromListCompletableFuture(java.util.List<java.util.concurrent.CompletableFuture<R>> list) |
default <R> SimpleReactStream<R> |
fromStream(java.util.stream.Stream<R> stream) |
default <R> SimpleReactStream<R> |
fromStreamCompletableFutureReplace(java.util.stream.Stream<java.util.concurrent.CompletableFuture<R>> stream) |
default <R> SimpleReactStream<R> |
fromStreamOfFutures(java.util.stream.Stream<java.util.concurrent.CompletableFuture<R>> stream)
Construct a SimpleReactStream from provided Stream of CompletableFutures
|
EagerStreamWrapper |
getLastActive() |
SimpleReact |
getSimpleReact() |
Continueable |
getSubscription() |
static <U,R> java.util.function.Function<U,R> |
handleExceptions(java.util.function.Function<? super U,? extends R> fn) |
static <U,R> SimpleReactStream<R> |
join(SimpleReactStream<BaseSimpleReactStream<U>> stream)
flatten nested SimpleReactStreams
|
static java.util.concurrent.CompletableFuture[] |
lastActiveArray(EagerStreamWrapper lastActive) |
default SimpleReactStream<U> |
limit(long maxSize)
Perform a limit operation on the underlying Stream of Futures
In contrast to EagerFutureStream#limit this removes entries basaed on their
start position
|
default SimpleReactStream<U> |
merge(SimpleReactStream<U>... s) |
static <R> SimpleReactStream<R> |
merge(SimpleReactStream s1,
SimpleReactStream s2)
Merge this reactive dataflow with another - recommended for merging
different types.
|
default SimpleReactStream<U> |
onFail(java.lang.Class<? extends java.lang.Throwable> exceptionClass,
java.util.function.Function<SimpleReactFailedStageException,U> fn)
Recover for a particular class of exceptions only.
|
default SimpleReactStream<U> |
onFail(java.util.function.Function<SimpleReactFailedStageException,U> fn)
React onFail
Define a function that can be used to recover from exceptions during the
preceeding stage of the dataflow.
|
default SimpleReactStream<U> |
peek(java.util.function.Consumer<? super U> consumer)
Peek asynchronously at the results in the current stage.
|
default SimpleReactStream<U> |
peekSync(java.util.function.Consumer<? super U> consumer)
Synchronous peek operator
|
default <R> SimpleReactStream<R> |
retry(java.util.function.Function<? super U,? extends R> fn)
Will execute this phase on the RetryExecutor (default or user supplied).
|
default SimpleReactStream<U> |
reverse()
Reversed, operating on the underlying futures.
|
default SimpleReactStream<U> |
self(java.util.function.Consumer<SimpleReactStream<U>> consumer)
Give a function access to the current stage of a SimpleReact Stream
|
default SimpleReactStream<U> |
skip(long n)
In contast to EagerFutureStream#skip skipFutures will skip the first n entries
of the underlying Stream of Futures.
|
default <T> org.jooq.lambda.Seq<U> |
skipUntil(SimpleReactStream<T> s)
Return a Stream with the same values as this Stream, but with all values omitted until the provided stream starts emitting values.
|
default SimpleReactStream<U> |
slice(long from,
long to)
Returns a limited interval from a given Stream.
|
default org.jooq.lambda.tuple.Tuple2<SimpleReactStream<U>,SimpleReactStream<U>> |
splitAt(long position)
Split a stream at a given position.
|
default <T> java.util.stream.Stream<java.util.concurrent.CompletableFuture<T>> |
streamCompletableFutures() |
default SimpleReactStream<U> |
sync() |
default <T> org.jooq.lambda.Seq<U> |
takeUntil(SimpleReactStream<T> s)
Return a Stream with the same values, but will stop emitting values once the provided Stream starts to emit values.
|
default <R> SimpleReactStream<R> |
then(java.util.function.Function<U,R> fn)
React then
Unlike 'with' this method is fluent, and returns another Stage Builder
that can represent the next stage in the dataflow.
|
default <R> SimpleReactStream<R> |
then(java.util.function.Function<U,R> fn,
java.util.concurrent.Executor service) |
default <R> SimpleReactStream<R> |
thenSync(java.util.function.Function<U,R> fn) |
default <R> java.util.List<java.util.concurrent.CompletableFuture<R>> |
with(java.util.function.Function<U,R> fn)
React with
Asynchronously apply the function supplied to the currently active event
tasks in the dataflow.
|
SimpleReactStream<U> |
withAsync(boolean b) |
SimpleReactStream<U> |
withErrorHandler(java.util.Optional<java.util.function.Consumer<java.lang.Throwable>> errorHandler) |
SimpleReactStream<U> |
withLastActive(EagerStreamWrapper streamWrapper) |
default <T2> org.jooq.lambda.Seq<org.jooq.lambda.tuple.Tuple2<U,T2>> |
withLatest(SimpleReactStream<T2> right) |
SimpleReactStream<U> |
withQueueFactory(QueueFactory<U> queue) |
SimpleReactStream<U> |
withRetrier(com.nurkiewicz.asyncretry.RetryExecutor retry) |
SimpleReactStream<U> |
withSubscription(Continueable sub) |
SimpleReactStream<U> |
withTaskExecutor(java.util.concurrent.Executor e) |
default <R> SimpleReactStream<org.jooq.lambda.tuple.Tuple2<U,R>> |
zip(SimpleReactStream<R> other)
Zip two Streams, zipping against the underlying futures of both Streams
Placeholders (Futures) will be populated immediately in the new zipped Stream and results
will be populated asyncrhonously
|
default <R> SimpleReactStream<org.jooq.lambda.tuple.Tuple2<U,R>> |
zip(java.util.stream.Stream<R> other)
Zip two Streams, zipping against the underlying futures of this stream
|
default SimpleReactStream<org.jooq.lambda.tuple.Tuple2<U,java.lang.Long>> |
zipWithIndex()
Zip this Stream with an index, but Zip based on the underlying tasks, not completed results.
|
cast, empty, freeThread, freeThread, getQueueFactory, getTaskExecutor, intersperse, isAsync, iterator, of, of, ofType, parallel, react, react, simpleReactStream, simpleReactStream, simpleReactStream, simpleReactStream, simpleReactStreamFrom, simpleReactStreamFromIterable, toQueue
block, block, blockAndExtract, blockAndExtract, first, getErrorHandler, last
getErrorHandler, getRetrier, getTaskExecutor, isAsync
addToQueue, getQueueFactory, toQueue, toQueue, toQueue
SimpleReact getSimpleReact()
getSimpleReact
in interface BaseSimpleReactStream<U>
getSimpleReact
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
SimpleReactStream<U> withLastActive(EagerStreamWrapper streamWrapper)
EagerStreamWrapper getLastActive()
getLastActive
in interface BaseSimpleReactStream<U>
getLastActive
in interface BlockingStream<U>
SimpleReactStream<U> withTaskExecutor(java.util.concurrent.Executor e)
withTaskExecutor
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
SimpleReactStream<U> withRetrier(com.nurkiewicz.asyncretry.RetryExecutor retry)
withRetrier
in interface BaseSimpleReactStream<U>
withRetrier
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
SimpleReactStream<U> withQueueFactory(QueueFactory<U> queue)
withQueueFactory
in interface BaseSimpleReactStream<U>
withQueueFactory
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
SimpleReactStream<U> withErrorHandler(java.util.Optional<java.util.function.Consumer<java.lang.Throwable>> errorHandler)
withErrorHandler
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
SimpleReactStream<U> withSubscription(Continueable sub)
withSubscription
in interface BaseSimpleReactStream<U>
withSubscription
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
SimpleReactStream<U> withAsync(boolean b)
withAsync
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
Continueable getSubscription()
getSubscription
in interface BaseSimpleReactStream<U>
default <T2> org.jooq.lambda.Seq<org.jooq.lambda.tuple.Tuple2<U,T2>> combineLatest(SimpleReactStream<T2> right)
default <T2> org.jooq.lambda.Seq<org.jooq.lambda.tuple.Tuple2<U,T2>> withLatest(SimpleReactStream<T2> right)
default SimpleReactStream<U> self(java.util.function.Consumer<SimpleReactStream<U>> consumer)
consumer
- Consumer that will recieve current stagedefault org.jooq.lambda.tuple.Tuple2<SimpleReactStream<U>,SimpleReactStream<U>> splitAt(long position)
// tuple((1, 2, 3), (4, 5, 6))
EagerFutureStream.of(1, 2, 3, 4, 5,6).splitAt(3)
default org.jooq.lambda.tuple.Tuple2<SimpleReactStream<U>,SimpleReactStream<U>> duplicate()
EagerFutureStream.of(1, 2, 3).duplicate()
results in
tuple((1,2,3),(1,2,3))
Care should be taken not to use this method with infinite streams!duplicate()
default <R> SimpleReactStream<org.jooq.lambda.tuple.Tuple2<U,R>> zip(java.util.stream.Stream<R> other)
other
- default <R> SimpleReactStream<org.jooq.lambda.tuple.Tuple2<U,R>> zip(SimpleReactStream<R> other)
other
- Another FutureStream to zip Futures withdefault SimpleReactStream<org.jooq.lambda.tuple.Tuple2<U,java.lang.Long>> zipWithIndex()
EagerFutureStream.react(()->takesALotOfTime(),()->veryQuick()).zipWithIndex();
[["takesALotOfTime",0],["veryQuick",1]]
Where as with standard zipWithIndex you would get a new Stream ordered by completion
[["veryQuick",0],["takesALotOfTime",1]]
@SafeVarargs static <U> SimpleReactStream<U> firstOf(SimpleReactStream<U>... futureStreams)
futureStreams
- Streams to racedefault SimpleReactStream<U> reverse()
// (3, 2, 1) EagerFutureStream.of(1, 2, 3).reverse()
default SimpleReactStream<U> slice(long from, long to)
// (4, 5) EagerFutureStream.of(1, 2, 3, 4, 5, 6).sliceFutures(3, 5)
slice(long, long)
default SimpleReactStream<U> limit(long maxSize)
EagerFutureStream.of(()>loadSlow(),()>loadMedium(),()>loadFast())
.limitFutures(2)
//[loadSlow, loadMedium]
maxSize
- The size of the subsequent Streamdefault SimpleReactStream<U> skip(long n)
EagerFutureStream.of(()>loadSlow(),()>loadMedium(),()>loadFast())
.skip(2)
//[loadFast]
skip
in interface BaseSimpleReactStream<U>
n
- default <T> org.jooq.lambda.Seq<U> skipUntil(SimpleReactStream<T> s)
s
- Stream that will start the emission of values from this streamdefault <T> org.jooq.lambda.Seq<U> takeUntil(SimpleReactStream<T> s)
s
- Stream that will stop the emission of values from this streamdefault void cancel()
default java.util.List<SimpleReactStream<U>> copySimpleReactStream(int times)
default <R> SimpleReactStream<R> then(java.util.function.Function<U,R> fn, java.util.concurrent.Executor service)
then
in interface BaseSimpleReactStream<U>
default <R> SimpleReactStream<R> thenSync(java.util.function.Function<U,R> fn)
thenSync
in interface BaseSimpleReactStream<U>
default <T,R> SimpleReactStream<R> allOf(java.util.stream.Collector collector, java.util.function.Function<T,R> fn)
collector
- to perform aggregation / reduction operation on the results
from active stage (e.g. to Collect into a List or String)fn
- Function that receives the results of all currently active
tasks as inputdefault <R> SimpleReactStream<R> anyOf(java.util.function.Function<U,R> fn)
fn
- Function to apply when any of the previous events completestatic java.util.concurrent.CompletableFuture[] lastActiveArray(EagerStreamWrapper lastActive)
default <R> SimpleReactStream<R> retry(java.util.function.Function<? super U,? extends R> fn)
retry
in interface BaseSimpleReactStream<U>
fn
- Function that will be executed and retried on failuredefault <R> SimpleReactStream<R> fromStream(java.util.stream.Stream<R> stream)
fromStream
in interface BaseSimpleReactStream<U>
default <R> SimpleReactStream<R> fromStreamOfFutures(java.util.stream.Stream<java.util.concurrent.CompletableFuture<R>> stream)
stream
- JDK Stream to construct new SimpleReactStream fromdefault <R> SimpleReactStream<R> fromStreamCompletableFutureReplace(java.util.stream.Stream<java.util.concurrent.CompletableFuture<R>> stream)
default <R> SimpleReactStream<R> fromListCompletableFuture(java.util.List<java.util.concurrent.CompletableFuture<R>> list)
default <R> SimpleReactStream<R> then(java.util.function.Function<U,R> fn)
new SimpleReact().<Integer, Integer> react(() -> 1, () -> 2, () -> 3)
.then((it) -> it * 100)
.then((it) -> "*" + it)
React then allows event reactors to be chained. Unlike React with, which
returns a collection of Future references, React then is a fluent
interface that returns the React builder - allowing further reactors to
be added to the chain.
React then does not block.
React with can be called after React then which gives access to the full
CompleteableFuture api. CompleteableFutures can be passed back into
SimpleReact via SimpleReact.react(streamOfCompleteableFutures);
See this blog post for examples of what can be achieved via
CompleteableFuture :- http://www.nurkiewicz.com/2013/12/promises-and-completablefuture.htm
l then
in interface BaseSimpleReactStream<U>
fn
- Function to be applied to the results of the currently active
event tasksdefault SimpleReactStream<U> doOnEach(java.util.function.Function<U,U> fn)
doOnEach
in interface BaseSimpleReactStream<U>
fn
- Function to be applied to each completablefuture on completiondefault SimpleReactStream<U> doOnEachSync(java.util.function.Function<U,U> fn)
doOnEachSync
in interface BaseSimpleReactStream<U>
fn
- Function to be applied to each completablefuture on completiondefault SimpleReactStream<U> peek(java.util.function.Consumer<? super U> consumer)
peek
in interface BaseSimpleReactStream<U>
consumer
- That will recieve current resultsdefault SimpleReactStream<U> peekSync(java.util.function.Consumer<? super U> consumer)
peekSync
in interface BaseSimpleReactStream<U>
consumer
- Peek consumerstatic <U,R> java.util.function.Function<U,R> handleExceptions(java.util.function.Function<? super U,? extends R> fn)
default <R> SimpleReactStream<R> flatMapToCompletableFuture(java.util.function.Function<U,java.util.concurrent.CompletableFuture<R>> flatFn)
assertThat( new SimpleReact()
.of(1,2,3)
.flatMapCompletableFuture(i->CompletableFuture.completedFuture(i))
.block(),equalTo(Arrays.asList(1,2,3)));
In this example the result of the flatMapCompletableFuture is 'flattened' to the raw integer valuesflatMapToCompletableFuture
in interface BaseSimpleReactStream<U>
flatFn
- flatMap functiondefault <R> SimpleReactStream<R> flatMapToCompletableFutureSync(java.util.function.Function<U,java.util.concurrent.CompletableFuture<R>> flatFn)
assertThat( new SimpleReact()
.of(1,2,3)
.flatMapCompletableFutureSync(i->CompletableFuture.completedFuture(i))
.block(),equalTo(Arrays.asList(1,2,3)));
In this example the result of the flatMapCompletableFuture is 'flattened' to the raw integer valuesflatMapToCompletableFutureSync
in interface BaseSimpleReactStream<U>
flatFn
- flatMap functiondefault <R> SimpleReactStream<R> flatMap(java.util.function.Function<? super U,? extends java.util.stream.Stream<? extends R>> flatFn)
flatMap
in interface BaseSimpleReactStream<U>
flatFn
- Function that coverts a value (e.g. a Collection) into a Streamdefault <R> java.util.List<java.util.concurrent.CompletableFuture<R>> with(java.util.function.Function<U,R> fn)
List<CompletableFuture<Integer>> futures = new SimpleReact().<Integer, Integer> react(() -> 1, () -> 2, () -> 3)
.with((it) -> it * 100);
In this instance, 3 suppliers generate 3 numbers. These may be executed
in parallel, when they complete each number will be multiplied by 100 -
as a separate parrellel task (handled by a ForkJoinPool or configurable
task executor). A List of Future objects will be returned immediately
from Simple React and the tasks will be executed asynchronously.
React with does not block.fn
- Function to be applied to the results of the currently active
event tasksdefault SimpleReactStream<U> filter(java.util.function.Predicate<? super U> p)
filter
in interface BaseSimpleReactStream<U>
p
- Predicate that will be used to filter elements from the
dataflowdefault SimpleReactStream<U> filterSync(java.util.function.Predicate<? super U> p)
filterSync
in interface BaseSimpleReactStream<U>
p
- Predicate that will be used to filter elements from the
dataflowdefault <T> java.util.stream.Stream<java.util.concurrent.CompletableFuture<T>> streamCompletableFutures()
streamCompletableFutures
in interface BaseSimpleReactStream<U>
default SimpleReactStream<U> merge(SimpleReactStream<U>... s)
default java.util.List<U> block(java.util.function.Predicate<Status> breakout)
List<String> strings = new SimpleReact().<Integer, Integer> react(() -> 1, () -> 2, () -> 3)
.then(it -> it * 100)
.then(it -> "*" + it)
.block(status -> status.getCompleted()>1);
In this example the current thread will unblock once more than one result
has been returned.breakout
- Predicate that determines whether the block should be
continued or removeddefault <R> R block(java.util.stream.Collector collector, java.util.function.Predicate<Status> breakout)
collector
- to perform aggregation / reduction operation on the results
(e.g. to Collect into a List or String)breakout
- Predicate that determines whether the block should be
continued or removedstatic <R> SimpleReactStream<R> merge(SimpleReactStream s1, SimpleReactStream s2)
s1
- Reactive stage builder to merges2
- Reactive stage builder to mergedefault SimpleReactStream<U> onFail(java.util.function.Function<SimpleReactFailedStageException,U> fn)
List<String> strings = new SimpleReact().<Integer, Integer> react(() -> 100, () -> 2, () -> 3)
.then(it -> {
if (it == 100)
throw new RuntimeException("boo!");
return it;
})
.onFail(e -> 1)
.then(it -> "*" + it)
.block();
In this example onFail recovers from the RuntimeException thrown when the
input to the first 'then' stage is 100.onFail
in interface BaseSimpleReactStream<U>
fn
- Recovery function, the exception is input, and the recovery
value is outputdefault SimpleReactStream<U> onFail(java.lang.Class<? extends java.lang.Throwable> exceptionClass, java.util.function.Function<SimpleReactFailedStageException,U> fn)
onFail(IOException.class, recoveryFunction1)
.onFail(Throwable.class,recovertyFunction2)
For an IOException recoveryFunction1 will be executed
but with the definitions reveresed
onFail(Throwable.class,recovertyFunction2)
.onFail(IOException.class, recoveryFunction1)
recoveryFunction1 will not be calledonFail
in interface BaseSimpleReactStream<U>
exceptionClass
- Class of exceptions to recover fromfn
- Recovery functionstatic SimpleReactFailedStageException assureSimpleReactException(java.lang.Throwable throwable)
default SimpleReactStream<U> capture(java.util.function.Consumer<? extends java.lang.Throwable> errorHandler)
List<String> strings = new SimpleReact().<Integer, Integer> react(() -> 1, () -> 2, () -> 3)
.then(it -> it * 100)
.then(it -> {
if (it == 100)
throw new RuntimeException("boo!");
return it;
})
.onFail(e -> 1)
.then(it -> "*" + it)
.then(it -> {
if ("*200".equals(it))
throw new RuntimeException("boo!");
return it;
})
.capture(e -> logger.error(e.getMessage(),e))
.block();
In this case, strings will only contain the two successful results (for
()->1 and ()->3), an exception for the chain starting from Supplier
()->2 will be logged by capture. Capture will not capture the
exception thrown when an Integer value of 100 is found, but will catch
the exception when the String value "*200" is passed along the chain.capture
in interface BaseSimpleReactStream<U>
errorHandler
- A consumer that recieves and deals with an unrecoverable error
in the dataflowdefault <T,R> SimpleReactStream<R> allOf(java.util.function.Function<java.util.List<T>,R> fn)
boolean blocked[] = {false};
new SimpleReact().<Integer, Integer> react(() -> 1, () -> 2, () -> 3)
.then(it -> {
try {
Thread.sleep(50000);
} catch (Exception e) {
}
blocked[0] =true;
return 10;
})
.allOf( it -> it.size());
assertThat(blocked[0],is(false));
In this example, the current thread will continue and assert that it is
not blocked, allOf could continue and be executed in a separate thread.fn
- Function that recieves the results of all currently active
tasks as inputdefault LazyFutureStream<U> convertToLazyStream()
default SimpleReactStream<U> sync()
sync
in interface BaseSimpleReactStream<U>
default SimpleReactStream<U> async()
async
in interface BaseSimpleReactStream<U>
static <U,R> SimpleReactStream<R> bind(SimpleReactStream<U> stream, java.util.function.Function<U,BaseSimpleReactStream<R>> flatFn)
stream
- Stream to flatMapflatFn
- flatMap functionstatic <U,R> SimpleReactStream<R> join(SimpleReactStream<BaseSimpleReactStream<U>> stream)
stream
- Stream to flatten