public class SimpleReactStreamImpl<U> extends java.lang.Object implements SimpleReactStream<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> SimpleReactStream<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> SimpleReactStream<R> |
thenSync(java.util.function.Function<U,R> fn) |
Queue<U> |
toQueue()
Convert the current Stream to a SimpleReact Queue
|
SimpleReactStream<U> |
withAsync(boolean b) |
SimpleReactStream<U> |
withRetrier(com.nurkiewicz.asyncretry.RetryExecutor retry) |
SimpleReactStream<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, cancel, capture, combineLatest, convertToLazyStream, copySimpleReactStream, doOnEach, doOnEachSync, duplicate, filter, filterSync, firstOf, flatMap, flatMapToCompletableFuture, flatMapToCompletableFutureSync, fromListCompletableFuture, fromStream, fromStreamCompletableFutureReplace, fromStreamOfFutures, getLastActive, getSimpleReact, getSubscription, handleExceptions, join, lastActiveArray, limit, merge, merge, onFail, onFail, peek, peekSync, retry, reverse, self, skip, skipUntil, slice, splitAt, streamCompletableFutures, sync, takeUntil, then, then, with, withErrorHandler, withLastActive, withLatest, withQueueFactory, withSubscription, zip, zip, zipWithIndex
cast, empty, freeThread, freeThread, getQueueFactory, intersperse, iterator, of, of, ofType, parallel, react, react, simpleReactStream, simpleReactStream, simpleReactStream, simpleReactStream, simpleReactStreamFrom, simpleReactStreamFromIterable
block, block, blockAndExtract, blockAndExtract, first, getErrorHandler, last
getErrorHandler
addToQueue, getQueueFactory, toQueue, toQueue
public SimpleReactStreamImpl(SimpleReact simpleReact, java.util.stream.Stream<java.util.concurrent.CompletableFuture<U>> stream)
public SimpleReactStream<U> withAsync(boolean b)
withAsync
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
withAsync
in interface SimpleReactStream<U>
public <R> SimpleReactStream<R> thenSync(java.util.function.Function<U,R> fn)
thenSync
in interface BaseSimpleReactStream<U>
thenSync
in interface EagerToQueue<U>
thenSync
in interface SimpleReactStream<U>
public <T,R> SimpleReactStream<R> allOf(java.util.stream.Collector collector, java.util.function.Function<T,R> fn)
allOf
in interface EagerToQueue<U>
allOf
in interface SimpleReactStream<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 BaseSimpleReactStream<U>
getTaskExecutor
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
public com.nurkiewicz.asyncretry.RetryExecutor getRetrier()
getRetrier
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
public boolean isAsync()
isAsync
in interface BaseSimpleReactStream<U>
isAsync
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
public Queue<U> toQueue()
EagerToQueue
toQueue
in interface BaseSimpleReactStream<U>
toQueue
in interface EagerToQueue<U>
toQueue
in interface ToQueue<U>
public SimpleReactStream<U> withTaskExecutor(java.util.concurrent.Executor e)
withTaskExecutor
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
withTaskExecutor
in interface SimpleReactStream<U>
public SimpleReactStream<U> withRetrier(com.nurkiewicz.asyncretry.RetryExecutor retry)
withRetrier
in interface BaseSimpleReactStream<U>
withRetrier
in interface ConfigurableStream<U,java.util.concurrent.CompletableFuture<U>>
withRetrier
in interface SimpleReactStream<U>