Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.x: Improve JavaDoc of retryWhen() operators #5773

Merged
merged 4 commits into from
Dec 22, 2017

Conversation

akarnokd
Copy link
Member

This PR improves the Javadoc of the retryWhen operators in the 5 base classes, adds example to handling an asynchronous source with delay where an early onComplete may cause unexpected terminations otherwise.

Related: #5772.

@akarnokd akarnokd added this to the 2.2 milestone Dec 21, 2017
@codecov
Copy link

codecov bot commented Dec 21, 2017

Codecov Report

Merging #5773 into 2.x will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5773      +/-   ##
============================================
- Coverage     96.24%   96.23%   -0.02%     
- Complexity     5811     5814       +3     
============================================
  Files           634      634              
  Lines         41607    41607              
  Branches       5770     5770              
============================================
- Hits          40046    40041       -5     
- Misses          629      632       +3     
- Partials        932      934       +2
Impacted Files Coverage Δ Complexity Δ
src/main/java/io/reactivex/Flowable.java 100% <ø> (ø) 526 <0> (ø) ⬇️
src/main/java/io/reactivex/Completable.java 100% <ø> (ø) 115 <0> (ø) ⬇️
src/main/java/io/reactivex/Single.java 100% <ø> (ø) 137 <0> (ø) ⬇️
src/main/java/io/reactivex/Maybe.java 100% <ø> (ø) 170 <0> (ø) ⬇️
src/main/java/io/reactivex/Observable.java 100% <ø> (ø) 509 <0> (ø) ⬇️
.../operators/observable/ObservableFlatMapSingle.java 88.8% <0%> (-5.98%) 2% <0%> (ø)
.../internal/operators/flowable/FlowableInterval.java 94.44% <0%> (-2.78%) 3% <0%> (ø)
...ex/internal/subscribers/InnerQueuedSubscriber.java 96.07% <0%> (-1.97%) 18% <0%> (-1%)
.../io/reactivex/disposables/CompositeDisposable.java 97.24% <0%> (-1.84%) 39% <0%> (-1%)
...java/io/reactivex/processors/PublishProcessor.java 98.23% <0%> (-1.77%) 43% <0%> (-1%)
... and 25 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3096024...fd31839. Read the comment docs.

* Example:
*
* This retries 3 times, each time incrementing the number of seconds it waits.
*
* <pre><code>
* Publisher.create((Subscriber&lt;? super String&gt; s) -&gt; {
* Flowable.create((Subscriber&lt;? super String&gt; s) -&gt; {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@akarnokd
Copy link
Member Author

Spotted a few other mistakes in there.

@cardamon
Copy link
Contributor

Just noticed, in the .takeWhile(e -> counter.getAndIncrement() == 3) statements in the examples: that should probably be != 3?

@akarnokd
Copy link
Member Author

Indeed. Updated the PR and fixed the blockingX() calls in there as well.

@akarnokd akarnokd merged commit 20a72ca into ReactiveX:2.x Dec 22, 2017
@akarnokd akarnokd deleted the RetryWhenJavaDoc branch December 22, 2017 12:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants