public class FutureStreamUtils
extends java.lang.Object
Constructor and Description |
---|
FutureStreamUtils() |
Modifier and Type | Method and Description |
---|---|
static <T,X extends java.lang.Throwable> |
forEachEvent(java.util.stream.Stream<T> stream,
java.util.function.Consumer<? super T> consumerElement,
java.util.function.Consumer<? super java.lang.Throwable> consumerError,
java.lang.Runnable onComplete)
Perform a forEach operation over the Stream capturing any elements and errors in the supplied consumers
when the entire Stream has been processed an onComplete event will be recieved.
|
static <T,X extends java.lang.Throwable> |
forEachWithError(java.util.stream.Stream<T> stream,
java.util.function.Consumer<? super T> consumerElement,
java.util.function.Consumer<? super java.lang.Throwable> consumerError)
Perform a forEach operation over the Stream capturing any elements and errors in the supplied consumers,
|
static <T,X extends java.lang.Throwable> |
forEachX(java.util.stream.Stream<T> stream,
long x,
java.util.function.Consumer<? super T> consumerElement)
Perform a forEach operation over the Stream, without closing it, consuming only the specified number of elements from
the Stream, at this time.
|
static <T,X extends java.lang.Throwable> |
forEachXEvents(java.util.stream.Stream<T> stream,
long x,
java.util.function.Consumer<? super T> consumerElement,
java.util.function.Consumer<? super java.lang.Throwable> consumerError,
java.lang.Runnable onComplete)
Perform a forEach operation over the Stream without closing it, capturing any elements and errors in the supplied consumers, but only consuming
the specified number of elements from the Stream, at this time.
|
static <T,X extends java.lang.Throwable> |
forEachXWithError(java.util.stream.Stream<T> stream,
long x,
java.util.function.Consumer<? super T> consumerElement,
java.util.function.Consumer<? super java.lang.Throwable> consumerError)
Perform a forEach operation over the Stream without closing it, capturing any elements and errors in the supplied consumers, but only consuming
the specified number of elements from the Stream, at this time.
|
public static <T,X extends java.lang.Throwable> org.jooq.lambda.tuple.Tuple3<java.util.concurrent.CompletableFuture<org.reactivestreams.Subscription>,java.lang.Runnable,java.util.concurrent.CompletableFuture<java.lang.Boolean>> forEachX(java.util.stream.Stream<T> stream, long x, java.util.function.Consumer<? super T> consumerElement)
Stream
- - the Stream to consume data fromnumberOfElements
- To consume from the Stream at this timeconsumer
- To accept incoming events from the Streampublic static <T,X extends java.lang.Throwable> org.jooq.lambda.tuple.Tuple3<java.util.concurrent.CompletableFuture<org.reactivestreams.Subscription>,java.lang.Runnable,java.util.concurrent.CompletableFuture<java.lang.Boolean>> forEachXWithError(java.util.stream.Stream<T> stream, long x, java.util.function.Consumer<? super T> consumerElement, java.util.function.Consumer<? super java.lang.Throwable> consumerError)
Stream
- - the Stream to consume data fromnumberOfElements
- To consume from the Stream at this timeconsumer
- To accept incoming elements from the StreamconsumerError
- To accept incoming processing errors from the StreamonComplete
- To run after an onComplete eventpublic static <T,X extends java.lang.Throwable> org.jooq.lambda.tuple.Tuple3<java.util.concurrent.CompletableFuture<org.reactivestreams.Subscription>,java.lang.Runnable,java.util.concurrent.CompletableFuture<java.lang.Boolean>> forEachXEvents(java.util.stream.Stream<T> stream, long x, java.util.function.Consumer<? super T> consumerElement, java.util.function.Consumer<? super java.lang.Throwable> consumerError, java.lang.Runnable onComplete)
Stream
- - the Stream to consume data fromnumberOfElements
- To consume from the Stream at this timeconsumer
- To accept incoming elements from the StreamconsumerError
- To accept incoming processing errors from the StreamonComplete
- To run after an onComplete eventpublic static <T,X extends java.lang.Throwable> org.jooq.lambda.tuple.Tuple3<java.util.concurrent.CompletableFuture<org.reactivestreams.Subscription>,java.lang.Runnable,java.util.concurrent.CompletableFuture<java.lang.Boolean>> forEachWithError(java.util.stream.Stream<T> stream, java.util.function.Consumer<? super T> consumerElement, java.util.function.Consumer<? super java.lang.Throwable> consumerError)
Stream
- - the Stream to consume data fromconsumer
- To accept incoming elements from the StreamconsumerError
- To accept incoming processing errors from the Streampublic static <T,X extends java.lang.Throwable> org.jooq.lambda.tuple.Tuple3<java.util.concurrent.CompletableFuture<org.reactivestreams.Subscription>,java.lang.Runnable,java.util.concurrent.CompletableFuture<java.lang.Boolean>> forEachEvent(java.util.stream.Stream<T> stream, java.util.function.Consumer<? super T> consumerElement, java.util.function.Consumer<? super java.lang.Throwable> consumerError, java.lang.Runnable onComplete)
Stream
- - the Stream to consume data fromconsumer
- To accept incoming elements from the StreamconsumerError
- To accept incoming processing errors from the StreamonComplete
- To run after an onComplete event