Skip to content

v0.80 Simple React : API and stability enhacements

Compare
Choose a tag to compare
@johnmcclean johnmcclean released this 23 Mar 14:10
· 3334 commits to master since this release

API Enhancements

ReactPools :

Manages a pool of simple-react builder instances (REACTORs).
Streams can be executed within the pool, Pool can block if no capacity available or elastic pools that expand capacity on demand can be used.

ElasticPools

Sequential and Parallel standard REACTOR pools available for ease of use

Operator enhancements

Lot's of new and enhanced operators

zipping operators : combineLatest, withLatest
sharding operators : shard (map, fn)
Control operators - debounce, onePer, xPer, control (fn), skipUntil (stream), takeUntil (stream), jitter, fixedDelay
Batching operators - batchBySize, batchByTime, batch (fn)
Chunking operators - chunkSinceLastRead, chunkSinceLastReadIterator
Future operators for LazyFutureStream - zipFuturesWithIndex,duplicateFutures,zipFutures
clean up of Future operators API
doOnEach - perform an operation after each completion event in this stage, this operation does not form part of a stream / dataflow itself
firstOf - select first FutureStream to emit values

Fixes

Fix for #13

shard

shard allows a Stream to be partitioned by a function into multiple Streams.

eagerfuturestream shard

skipUntil

eagerfuturestream skipuntil

takeUntil

eagerfuturestream takeuntil

Zip operators

combineLatest

combineLatest takes the latest values from two Streams, unlike Zip however it does not wait for both Stream to emit new elements. Will use the last from the other Stream when one Stream emits a new element.

eagerfuturestream combinelatest

withLatest

withLatest takes the latest value from the current Stream when it emits a new value and combines it with the most recently emitted value from the provided Stream.

eagerfuturestream withlatest

Control operators

debounce

http://whatis.techtarget.com/definition/debouncing

Only allow a single element through within a specified time period, elements that aren't passed through are dropped

eagerfuturestream debounce

onePer & xPer

only allow one (or x) elements through in specified time period - slowing down the overall rate of flow. All elements are passed through.

fixedDelay

Imposes a fixedDelay between elements as they pass through the Stream

##Batching & Chunking operators

Batch

Batch takes a function to group elements into batches as they flow through. Provided functions include batchByTime and batchBySize.

eagerfuturestream batch

chunkSinceLastRead

chunks data passed through since last loop of iteration together into a batch.

eagerfuturestream chunksincelastread

Adding SimpleReact as a Dependency

Gradle

compile group: 'com.aol.simplereact', name:'simple-react', version:'0.80'

Maven

 <dependency>
   <groupId>com.aol.simplereact</groupId>
     <artifactId>simple-react</artifactId>
      <version>0.80</version>
     <scope>compile</scope>
   </dependency>

Javadoc

http://www.javadoc.io/doc/com.aol.simplereact/simple-react/0.80