-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Publish, Replay and Cache Operators #260
Publish, Replay and Cache Operators #260
Conversation
Cache operator as discussed in ReactiveX#209 Similar to `replay()` except that this auto-subscribes to the source sequence. This comes with the same cautions as `toList` when dealing with infinite or very large sequences.
RxJava-pull-requests #129 FAILURE |
RxJava-pull-requests #130 SUCCESS |
If anyone has comments on this I'd appreciate them in the next 12 hours otherwise I'll release a new version with these and the last few pull requests I've merged. |
@Override | ||
public void run() { | ||
counter.incrementAndGet(); | ||
System.out.println("published observable being executed"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe remove the debug outputs?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes I could do that ... though I'm glad this is a unit test and not in the actual production code or that would be embarrassing that I left it in :-)
Completed in #263 after merging with other pull requests that caused conflicts. |
…actor-mono-tofuture-success ReactiveX#245 Fix CircuitBreakerSubscriber for Reactor doesn't count successes…
Added basic Publish (#15) and Replay (#71) operators to Observable. I have not done any of the overloads (particularly
Replay
which has 10+ in .Net.I also added a new
Cache
operator as discussed by @johngmyers and I at #209.Playing with
Replay
andConnectableObservable
it does not cater well to the typical use case of needing to just de-dupe calls (cache the responses) so thisCache
operator can be thought of as an automatic version ofReplay
. It comes with the same risk astoList
if used with infinite or very large sequences as you can not unsubscribe from it.