public class SimpleReactStreamImpl<U> extends java.lang.Object implements EagerSimpleReactStream<U>, EagerToQueue<U>
Constructor and Description |
---|
SimpleReactStreamImpl(SimpleReact simpleReact,
java.util.stream.Stream<java.util.concurrent.CompletableFuture<U>> stream) |
Modifier and Type | Method and Description |
---|---|
<T,R> EagerSimpleReactStream<R> |
allOf(java.util.stream.Collector collector,
java.util.function.Function<T,R> fn) |
com.nurkiewicz.asyncretry.RetryExecutor |
getRetrier() |
java.util.concurrent.Executor |
getTaskExecutor() |
boolean |
isAsync() |
<R> EagerSimpleReactStream<R> |
thenSync(java.util.function.Function<U,R> fn) |
Queue<U> |
toQueue()
Convert the current Stream to a SimpleReact Queue
|
EagerSimpleReactStream<U> |
withAsync(boolean b) |
EagerSimpleReactStream<U> |
withRetrier(com.nurkiewicz.asyncretry.RetryExecutor retry) |
EagerSimpleReactStream<U> |
withTaskExecutor(java.util.concurrent.Executor e) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
allOf, anyOf, assureSimpleReactException, async, bind, block, block, capture, convertToEagerStream, copySimpleReactStream, doOnEach, doOnEachSync, filter, filterSync, flatMap, flatMapCompletableFuture, flatMapCompletableFutureSync, fromListCompletableFuture, fromStream, fromStreamCompletableFutureReplace, fromStreamOfFutures, getLastActive, getSubscription, handleExceptions, join, lastActiveArray, merge, merge, onFail, onFail, peek, peekSync, retry, streamCompletableFutures, sync, then, then, with, withErrorHandler, withLastActive, withQueueFactory, withSubscription
empty, getQueueFactory, getSimpleReact, iterator, of, of, ofThread, ofThread, parallel, react, react, simpleReactStream, simpleReactStream, simpleReactStream, simpleReactStream, simpleReactStreamFrom, simpleReactStreamFromIterable
block, block, blockAndExtract, blockAndExtract, first, getErrorHandler, last
getErrorHandler, getSimpleReact
addToQueue, getQueueFactory, toQueue, toQueue
public SimpleReactStreamImpl(SimpleReact simpleReact, java.util.stream.Stream<java.util.concurrent.CompletableFuture<U>> stream)
public EagerSimpleReactStream<U> withAsync(boolean b)
withAsync
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
withAsync
in interface EagerSimpleReactStream<U>
public <R> EagerSimpleReactStream<R> thenSync(java.util.function.Function<U,R> fn)
thenSync
in interface EagerSimpleReactStream<U>
thenSync
in interface EagerToQueue<U>
thenSync
in interface SimpleReactStream<U>
public <T,R> EagerSimpleReactStream<R> allOf(java.util.stream.Collector collector, java.util.function.Function<T,R> fn)
allOf
in interface EagerSimpleReactStream<U>
allOf
in interface EagerToQueue<U>
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 inputpublic java.util.concurrent.Executor getTaskExecutor()
getTaskExecutor
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
getTaskExecutor
in interface SimpleReactStream<U>
public com.nurkiewicz.asyncretry.RetryExecutor getRetrier()
getRetrier
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
public boolean isAsync()
isAsync
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
isAsync
in interface SimpleReactStream<U>
public Queue<U> toQueue()
EagerToQueue
toQueue
in interface EagerToQueue<U>
toQueue
in interface SimpleReactStream<U>
toQueue
in interface ToQueue<U>
public EagerSimpleReactStream<U> withTaskExecutor(java.util.concurrent.Executor e)
withTaskExecutor
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
withTaskExecutor
in interface EagerSimpleReactStream<U>
public EagerSimpleReactStream<U> withRetrier(com.nurkiewicz.asyncretry.RetryExecutor retry)
withRetrier
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
withRetrier
in interface EagerSimpleReactStream<U>
withRetrier
in interface SimpleReactStream<U>