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: Add refCount with count & disconnect timeout #5986

Merged
merged 2 commits into from
May 9, 2018

Conversation

akarnokd
Copy link
Member

This PR exposes the additional refCount operation modes from #5975:

  • Connect only when the specified number of Subscribers/Observers have subscribed
  • Disconnect when the given amount of time elapsed since the very last Subscriber/Observer cancelled/disposed.
  • The combination of both.

In addition, the original refCount received extra JavaDocs details.

@codecov
Copy link

codecov bot commented Apr 30, 2018

Codecov Report

Merging #5986 into 2.x will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@             Coverage Diff              @@
##                2.x    #5986      +/-   ##
============================================
+ Coverage     98.22%   98.24%   +0.01%     
- Complexity     6053     6062       +9     
============================================
  Files           656      656              
  Lines         44078    44094      +16     
  Branches       6118     6118              
============================================
+ Hits          43297    43321      +24     
+ Misses          235      231       -4     
+ Partials        546      542       -4
Impacted Files Coverage Δ Complexity Δ
...va/io/reactivex/flowables/ConnectableFlowable.java 100% <100%> (ø) 12 <5> (+5) ⬆️
...o/reactivex/observables/ConnectableObservable.java 100% <100%> (ø) 12 <5> (+5) ⬆️
...nternal/operators/observable/ObservableCreate.java 93.04% <0%> (-5.22%) 2% <0%> (ø)
...tivex/internal/observers/FutureSingleObserver.java 94.33% <0%> (-3.78%) 24% <0%> (-1%)
...java/io/reactivex/processors/PublishProcessor.java 98.19% <0%> (-1.81%) 42% <0%> (-1%)
.../operators/mixed/FlowableSwitchMapCompletable.java 98.94% <0%> (-1.06%) 2% <0%> (ø)
...perators/observable/ObservableMergeWithSingle.java 99.06% <0%> (-0.94%) 2% <0%> (ø)
...nternal/operators/observable/ObservableReplay.java 98.08% <0%> (-0.55%) 23% <0%> (ø)
...rnal/operators/flowable/FlowableFlatMapSingle.java 92.93% <0%> (-0.55%) 2% <0%> (ø)
...ernal/operators/flowable/FlowableFromIterable.java 94.65% <0%> (-0.54%) 5% <0%> (ø)
... and 15 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 d57af5a...af58c94. Read the comment docs.

Copy link
Collaborator

@vanniktech vanniktech left a comment

Choose a reason for hiding this comment

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

Nice

Copy link
Collaborator

@vanniktech vanniktech left a comment

Choose a reason for hiding this comment

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

Nice

@akarnokd
Copy link
Member Author

akarnokd commented May 5, 2018

/cc @artem-zinnatullin

@akarnokd akarnokd merged commit cedfc53 into ReactiveX:2.x May 9, 2018
@akarnokd akarnokd deleted the MoreRefcountOps branch May 9, 2018 07:44
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.

2 participants