public interface LazyStream<U> extends BlockingStream<U>
Modifier and Type | Method and Description |
---|---|
default <R> R |
collect(java.util.function.Supplier<R> supplier,
java.util.function.BiConsumer<R,? super U> accumulator,
java.util.function.BiConsumer<R,R> combiner) |
default void |
forEach(java.util.function.Consumer<? super U> c) |
java.util.Optional<java.util.function.Consumer<java.lang.Throwable>> |
getErrorHandler() |
LazyStreamWrapper<U> |
getLastActive() |
java.util.function.Supplier<LazyResultConsumer<U>> |
getLazyCollector() |
MaxActive |
getMaxActive() |
ParallelReductionConfig |
getParallelReduction() |
default java.util.Optional<U> |
reduce(java.util.function.BinaryOperator<U> accumulator) |
default <T> T |
reduce(T identity,
java.util.function.BiFunction<T,? super U,T> accumulator,
java.util.function.BinaryOperator<T> combiner) |
default U |
reduce(U identity,
java.util.function.BinaryOperator<U> accumulator) |
default void |
run()
Trigger a lazy stream
|
default <A,R> R |
run(java.util.stream.Collector<U,A,R> collector)
Trigger a lazy stream and return the results in the Collection created by
the collector
|
default Continuation |
runContinuation(java.lang.Runnable r) |
default void |
runOn(java.util.concurrent.Executor e)
Trigger a lazy stream as a task on the provided Executor
|
default void |
runOnCurrent()
Trigger a lazy stream
|
default void |
runThread(java.lang.Runnable r) |
block, block, blockAndExtract, blockAndExtract, first, last
LazyStreamWrapper<U> getLastActive()
getLastActive
in interface BlockingStream<U>
java.util.function.Supplier<LazyResultConsumer<U>> getLazyCollector()
java.util.Optional<java.util.function.Consumer<java.lang.Throwable>> getErrorHandler()
getErrorHandler
in interface BlockingStream<U>
ParallelReductionConfig getParallelReduction()
MaxActive getMaxActive()
default void runOn(java.util.concurrent.Executor e)
e
- Executor service to trigger lazy stream on (Stream
CompletableFutures will use Executor associated with
this Stage may not be the same one).default void runThread(java.lang.Runnable r)
default Continuation runContinuation(java.lang.Runnable r)
default void runOnCurrent()
default void run()
default <A,R> R run(java.util.stream.Collector<U,A,R> collector)
collector
- Supplier that creates a collection to store results indefault void forEach(java.util.function.Consumer<? super U> c)
default <T> T reduce(T identity, java.util.function.BiFunction<T,? super U,T> accumulator, java.util.function.BinaryOperator<T> combiner)
default <R> R collect(java.util.function.Supplier<R> supplier, java.util.function.BiConsumer<R,? super U> accumulator, java.util.function.BiConsumer<R,R> combiner)