public class SimpleReactStreamImpl<U> extends java.lang.Object implements SimpleReactStream<U>, EagerToQueue<U>
ConfigurableStream.SimpleReactConfigurableStream<U>
Constructor and Description |
---|
SimpleReactStreamImpl(SimpleReact simpleReact,
java.util.stream.Stream<java.util.concurrent.CompletableFuture<U>> stream,
java.util.List<java.util.concurrent.CompletableFuture> originalFutures) |
Modifier and Type | Method and Description |
---|---|
<T,R> SimpleReactStream<R> |
allOf(java.util.stream.Collector collector,
java.util.function.Function<T,R> fn) |
BaseSimpleReact |
getPopulator() |
com.nurkiewicz.asyncretry.RetryExecutor |
getRetrier() |
java.util.concurrent.Executor |
getTaskExecutor() |
boolean |
isAsync() |
void |
returnPopulator(BaseSimpleReact service) |
<R> SimpleReactStream<R> |
thenSync(java.util.function.Function<U,R> fn) |
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, capture, doOnEach, doOnEachSync, empty, filter, filterSync, flatMap, fromListCompletableFuture, fromStream, fromStreamCompletableFutureReplace, fromStreamOfFutures, getOriginalFutures, getSubscription, handleExceptions, join, lastActiveArray, merge, merge, of, of, of, of, ofIterable, onFail, onFail, parallelBuilder, parallelBuilder, parallelCommonBuilder, parallelOf, peek, peekSync, react, react, retry, sequentialBuilder, sequentialCommonBuilder, streamCompletableFutures, sync, then, then, with
block, block, block, block, blockAndExtract, blockAndExtract, first, last
withErrorHandler, withLastActive, withLazyCollector, withQueueFactory, withSubscription, withWaitStrategy
getErrorHandler, getLastActive, getSimpleReact, isEager
getQueueFactory, toQueue, toQueue, toQueue
public SimpleReactStreamImpl(SimpleReact simpleReact, java.util.stream.Stream<java.util.concurrent.CompletableFuture<U>> stream, java.util.List<java.util.concurrent.CompletableFuture> originalFutures)
public BaseSimpleReact getPopulator()
public void returnPopulator(BaseSimpleReact service)
public SimpleReactStream<U> withAsync(boolean b)
withAsync
in interface ConfigurableStream<U>
withAsync
in interface ConfigurableStream.SimpleReactConfigurableStream<U>
public <R> SimpleReactStream<R> thenSync(java.util.function.Function<U,R> fn)
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 ConfigurableStream<U>
public com.nurkiewicz.asyncretry.RetryExecutor getRetrier()
getRetrier
in interface ConfigurableStream<U>
public boolean isAsync()
isAsync
in interface ConfigurableStream<U>
public SimpleReactStream<U> withTaskExecutor(java.util.concurrent.Executor e)
withTaskExecutor
in interface ConfigurableStream<U>
withTaskExecutor
in interface ConfigurableStream.SimpleReactConfigurableStream<U>
public SimpleReactStream<U> withRetrier(com.nurkiewicz.asyncretry.RetryExecutor retry)
withRetrier
in interface ConfigurableStream<U>
withRetrier
in interface ConfigurableStream.SimpleReactConfigurableStream<U>