v0.60 : anyOf and EagerFutureStream operations on underlying Futures
New in SimpleReact v0.60
anyOf enhancement
anyOf progresses the flow with the first result received.
Example
new SimpleReact().reactToCollection(urls)
.map(restAgent::call)
.anyOf(processor::transform)
.then(saver::save);
EagerFutureStream operations on underlying Futures
EagerFutureSteam operations typically operate on the result of an operation rather than the underlying Stream of CompletableFutures. For example limit works by accepting the first X results and rejecting all subsequent ones.
limitFutures on the other hand operates on the underlying Futures in much the same way as LazyFutureStream limit does. (LazyFutureStream typically operates on the underlying Futures as they can be infinite in size). e.g.
[Behaviour for LazyFutureStream limit and EagerFutureStream limitFutures]
The new Future operations are
limitFutures
skipFutures
zipFutures
zipFuturesWithIndex
duplicateFutures
splitAtFutures
sliceFutures
compared with standard slice
Bug fix for EagerFutureStream.slice
Adding SimpleReact as a Dependency
Gradle
compile group: 'com.aol.simplereact', name:'simple-react', version:'0.6'
Maven
<dependency>
<groupId>com.aol.simplereact</groupId>
<artifactId>simple-react</artifactId>
<version>0.60</version>
<scope>compile</scope>
</dependency>
Javadoc
http://www.javadoc.io/doc/com.aol.simplereact/simple-react/0.60