then flatten the emissions from those into a single Observable” - source Transforms every element of a collection into another collection of items and combines them into a single collection.
students to write an essay on werewolves. • The students who will turn in the essay first will get more points than the ones submitting later. • Students are divided into four house observables : • GryffindorObservable (G), • SlytherinObservable (S), • HufflepuffObservable (H) and • RavenclawObservable(R)).
and others) • Death Eaters (Lucius Malfoy, Bellatrix Lestrange and others) • Each team is casting lethal spells against the other team. • Dumbledore’s army is not as experienced as the Death Eaters. • Spells produced by Death Eaters is overwhelming the Dumbledore’s army (consumer).
of emitting one item at a time. “Periodically gather items emitted by an Observable into bundles and emit these bundles rather than emitting the items one at a time" - source
when, some time has passed since it last emitted anything. “Only emit an item from an Observable if a particular timespan has passed without it emitting another item" - source
the ability of Consumer to consume. “Strategies for coping with Observables that produce items more rapidly than their observers consume them” - source
is tagged as @BackpressureSupport(BackpressureKind.ERROR) • ERROR : The operator will emit a MissingBackpressureException if the downstream didn't request enough or in time. • Consumers should consider applying one of the {@code onBackpressureXXX} operators as well.
//TODO subscribe to getFluxWeed() magicalDataSource.getFluxWeed().subscribe(testObserver); //TODO tell observer to wait for terminal event testObserver.awaitTerminalEvent(); //TODO assert there are no errors testObserver.assertNoErrors(); //TODO assert we received onComplete testObserver.assertComplete(); testGetFluxWeed() - TestObserver
TestSubscriber.create(); //TODO subscribe to getFluxWeed() magicalDataSource.getFluxWeedFlowable().subscribe(testSubscriber); //TODO tell subscriber to wait for terminal event testSubscriber.awaitTerminalEvent(); //TODO assert there are no errors testSubscriber.assertNoErrors(); //TODO assert we received onComplete testSubscriber.assertComplete(); testGetFluxWeedFlowable() - TestObserver
not a foe. • Learn by examples - Kaushik Gopal RxJava. https://github.com/kaushikgopal/RxJava-Android-Samples • Codelab - Full Extended Text version (coming soon on) : https://github.com/ragdroid/rxify/tree/codelab • My Medium blogs for more details. https://medium.com/@ragdroid What’s Next