Releases: aol/cyclops
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
v0.5 : Hierarchical failure handling
New in SimpleReact v0.5
Error Handling (onFail) enhancements.
onFail calls can be chained to handle different exceptions for a stage.
Example
new EagerReact().react(()->1,()->2)
.then(this::makeRestRequests)
.onFail(TimeoutException.class, e-> markHostUnreachable(e.getValue()) )
.onFail(InvalidResponseException.class, e-> markHostCommunicationIssue(e.getValue())
.onFail(Throwable.class, e-> handleUnexpectedException(e))
.collect(Collectors.toList());
Adding SimpleReact as a Dependency
Gradle
compile group: 'com.aol.simplereact', name:'simple-react', version:'0.5'
##Maven
<dependency>
<groupId>com.aol.simplereact</groupId>
<artifactId>simple-react</artifactId>
<version>0.5</version>
<scope>compile</scope>
</dependency>
Javadoc
http://www.javadoc.io/doc/com.aol.simplereact/simple-react/0.5
v0.41 : EagerReact and LazyReact API bug fix
Both EagerReact and LazyReact we're returning a sub-class type SimpleReactStream rather than EagerFutureStream or LazyFutureStream on the
EagerReact#react(Supplier... s) method.
This release fixes this issue.
Adding SimpleReact as a Dependency
Gradle
compile group: 'com.aol.simplereact', name:'simple-react', version:'0.41'
##Maven
<dependency>
<groupId>com.aol.simplereact</groupId>
<artifactId>simple-react</artifactId>
<version>0.41</version>
<scope>compile</scope>
</dependency>
Javadoc
http://www.javadoc.io/doc/com.aol.simplereact/simple-react/0.4
v0.4
New in SimpleReact v0.4
API Simplification into 3 separate Streaming APIs
Implementing java.util.stream.Stream & org.jooq.lambda.Seq :
- EagerFutureStream : An easy to use JDK 8 Stream of CompletableFutures, with all of the SimpleReact API methods, and scala-like jOOλ Seq methods too. EagerFutureStream kicks of future tasks eagerly and can be run in either parallel or sequential (free-threaded) modes.
- LazyFutureStream : Provides a Lazy JDK 8 Stream of CompletableFutures (and Seq, and SimpleReact API methods). Can be used for constant proccessing (e.g. of data coming in off a SimpleReact asynchronous queue).
Smaller / focused Api
- SimpleReactStream : Provides a simple, focused API for Streaming Futures based on the Promises / A++ spec.
Other changes
onFail method can now capture input to the previous stage that failed.
Adding SimpleReact as a Dependency
Gradle
compile group: 'com.aol.simplereact', name:'simple-react', version:'0.4'
Maven
<dependency>
<groupId>com.aol.simplereact</groupId>
<artifactId>simple-react</artifactId>
<version>0.4</version>
<scope>compile</scope>
</dependency>
Javadoc
http://www.javadoc.io/doc/com.aol.simplereact/simple-react/0.4
Simple React v0.3
New in SimpleReact v0.3
SimpleReact Stage implements java.util.stream.Stream. This adds methods such as flatMap, reduce, max, min to SimpleReact.
SimpleReact Stage implements org.jooq.lambda.Seq - which extends Stream. This adds methods such as zip, concat, foldLeft, foldRight, unzip to SimpleReact.
SimpleReact introduces automatic configurable aysnchronous retry support.
Better support for Infinite Streaming.
More performant results capturing for lazy streams.
Better performance due to configurable capacity monitoring.
Static Factory methods moved to ReactStream class.
SimpleReact class diagram and new functionality :
Adding SimpleReact as a Dependency
Gradle
compile group: 'com.aol.simplereact', name:'simple-react', version:'0.3'
Maven
v0.2
v0.2 : 11th Feb 2015
- New data structures : Queue, Topic and Signal (https://medium.com/@johnmcclean/plumbing-java-8-streams-with-queues-topics-and-signals-d9a71eafbbcc)
- Infinite Streams via SimpleReact.lazy() (https://github.com/aol/simple-react/wiki/Infinite-Streams-in-SimpleReact) and simpleReact.reactInfinitely(Supplier s)
- Improved Generics / type inference for allOf
- Predicates class with limit, skip and sample java.util.Predicate's for Filtering
Adding SimpleReact as a Dependency
Gradle
compile group: 'com.aol.simplereact', name:'simple-react', version:'0.2'
Maven
<dependency>
<groupId>com.aol.simplereact</groupId>
<artifactId>simple-react</artifactId>
<version>0.2</version>
<scope>compile</scope>
</dependency>
Javadoc
http://www.javadoc.io/doc/com.aol.simplereact/simple-react/0.2