Reference
- rxx.enforce_ordering(sources, key_mapper, lookup_size=1)
emits items of the sources by respecting the incoming order of each element.
Each items emitted by the source observables are emitted as ordered according to a key. Sorting is done in an ascending order. Total ordering is not garanteed if the incoming items are not ordered on each source observable.
When ordering on individual sources is not guaranteed, then the lookup_size is the depth being used to check for the next items to emit.
Sources are observables emitting push observables.
- Parameters
key_mapper – A function that maps the sorting key for each item
lookup_size – [Optional] The buffer size being used on each source to look for the next item to emit.
- Returns
Push Observables emitting the same items than the sources observables.
- rxx.pullable.pull()
Transforms an observable to a pull based observable
A pull based observable emits items only on request, via an upstream request path. The implementation of the pull is done by blocking the source obeservable on the item emission.
- Returns
A pull based Observable.
- rxx.pullable.push()
Transforms a pull based observable to an Observable
- Returns
An Observable.
- rxx.pullable.sorted_merge(key_mapper, lookup_size=1)
Merges a higher order pull based source observable by respecting the incoming order of each element.
Each items emitted by the source observables are emitted as ordered according to a key. Sorting is done in an ascending order. Total ordering is not garanteed if the incoming items are not ordered on each source observable.
When ordering on individual sources is not guaranteed, then the lookup_size is the depth being used to check for the next items to emit.
Source is a higher-order observable emitting pull observables.
- Parameters
key_mapper – A function that maps the sorting key for each item
lookup_size – [Optional] The buffer size being used on each source to look for the next item to emit.
- Returns
A pull based Observable.