public class SimpleReact extends BaseSimpleReact
Constructor and Description |
---|
SimpleReact()
Construct a SimpleReact builder using standard thread pool.
|
SimpleReact(java.util.concurrent.Executor executor) |
SimpleReact(java.util.concurrent.Executor executor,
com.nurkiewicz.asyncretry.RetryExecutor retrier) |
SimpleReact(java.util.concurrent.Executor executor,
com.nurkiewicz.asyncretry.RetryExecutor retrier,
java.lang.Boolean async) |
Modifier and Type | Method and Description |
---|---|
<U> SimpleReactStream<U> |
construct(java.util.stream.Stream s,
java.util.List<java.util.concurrent.CompletableFuture> originalFutures) |
<U> SimpleReactStream<U> |
fromStream(java.util.stream.Stream<java.util.concurrent.CompletableFuture<U>> stream)
Start a reactive dataflow from a stream of CompletableFutures.
|
boolean |
isAsync() |
<U> SimpleReactStream<U> |
react(java.util.Collection<java.util.function.Supplier<U>> actions)
Start a reactive dataflow with a list of one-off-suppliers
|
<U> SimpleReactStream<U> |
react(java.util.Iterator<java.util.function.Supplier<U>> actions)
Start a reactive dataflow with a list of one-off-suppliers
|
<U> SimpleReactStream<U> |
react(java.util.stream.Stream<java.util.function.Supplier<U>> actions)
Start a reactive dataflow with a list of one-off-suppliers
|
<U> SimpleReactStream<U> |
react(java.util.function.Supplier<U>... actions)
Start a reactive dataflow with an array of one-off-suppliers
|
protected <U> SimpleReactStream<U> |
reactI(java.util.function.Supplier<U>... actions)
This internal method has been left protected, so it can be mocked / stubbed as some of the entry points are final
|
<U> SimpleReactStream<U> |
reactIterable(java.lang.Iterable<java.util.function.Supplier<U>> actions)
Start a reactive dataflow with a list of one-off-suppliers
|
getExecutor, getRetrier, of, of, of, of, of, of, of, ofIterable, range
public SimpleReact()
ThreadPools.getStandard()
public SimpleReact(java.util.concurrent.Executor executor)
executor
- Executor this SimpleReact instance will use to execute concurrent tasks.public SimpleReact(java.util.concurrent.Executor executor, com.nurkiewicz.asyncretry.RetryExecutor retrier)
public SimpleReact(java.util.concurrent.Executor executor, com.nurkiewicz.asyncretry.RetryExecutor retrier, java.lang.Boolean async)
public <U> SimpleReactStream<U> construct(java.util.stream.Stream s, java.util.List<java.util.concurrent.CompletableFuture> originalFutures)
construct
in class BaseSimpleReact
public <U> SimpleReactStream<U> fromStream(java.util.stream.Stream<java.util.concurrent.CompletableFuture<U>> stream)
fromStream
in class BaseSimpleReact
stream
- of CompletableFutures that will be used to drive the reactive dataflowpublic <U> SimpleReactStream<U> react(java.util.Collection<java.util.function.Supplier<U>> actions)
react
in class BaseSimpleReact
actions
- List of Suppliers to provide data (and thus events) that
downstream jobs will react toopublic <U> SimpleReactStream<U> react(java.util.stream.Stream<java.util.function.Supplier<U>> actions)
react
in class BaseSimpleReact
actions
- Stream of Suppliers to provide data (and thus events) that
downstream jobs will react toopublic <U> SimpleReactStream<U> react(java.util.Iterator<java.util.function.Supplier<U>> actions)
react
in class BaseSimpleReact
actions
- Iterator over Suppliers to provide data (and thus events) that
downstream jobs will react toopublic <U> SimpleReactStream<U> reactIterable(java.lang.Iterable<java.util.function.Supplier<U>> actions)
reactIterable
in class BaseSimpleReact
actions
- Stream of Suppliers to provide data (and thus events) that
downstream jobs will react too@SafeVarargs public final <U> SimpleReactStream<U> react(java.util.function.Supplier<U>... actions)
react
in class BaseSimpleReact
actions
- Array of Suppliers to provide data (and thus events) that
downstream jobs will react tooprotected <U> SimpleReactStream<U> reactI(java.util.function.Supplier<U>... actions)
reactI
in class BaseSimpleReact
public boolean isAsync()
isAsync
in class BaseSimpleReact