Event publishing for LoadBalancer#218
Merged
NiteshKant merged 2 commits intorsocket:0.5.x-eventsrsocket/rsocket-java:0.5.x-eventsfrom Jan 9, 2017
NiteshKant:0.5.x-events-lbNiteshKant/reactivesocket-java:0.5.x-events-lbCopy head branch name to clipboard
Merged
Event publishing for LoadBalancer#218NiteshKant merged 2 commits intorsocket:0.5.x-eventsrsocket/rsocket-java:0.5.x-eventsfrom NiteshKant:0.5.x-events-lbNiteshKant/reactivesocket-java:0.5.x-events-lbCopy head branch name to clipboard
LoadBalancer#218NiteshKant merged 2 commits intorsocket:0.5.x-eventsrsocket/rsocket-java:0.5.x-eventsfrom
NiteshKant:0.5.x-events-lbNiteshKant/reactivesocket-java:0.5.x-events-lbCopy head branch name to clipboard
Conversation
__Problem__ No events are published for `LoadBalancer` __Modification__ Publishing events for `LoadBalancer` __Result__ More events, more insight!
robertroeser
approved these changes
Jan 9, 2017
stevegury
requested changes
Jan 9, 2017
| lastRefresh = now; | ||
| addSockets(1); | ||
| if (eventListener != null) { | ||
| eventListener.socketsRefreshCompleted(Clock.elapsedSince(now), Clock.unit()); |
Member
There was a problem hiding this comment.
I think this would be better moved inside addSocket, since the addSocket action is asynchronous.
Contributor
Author
There was a problem hiding this comment.
(Discussed offline)
It is more involved to emit this event after the addSocket is finished. This event is more useful to indicate that socket refresh is happening, latency of connect can be useful in determining latency of refresh.
| int n = numberOfNewSocket; | ||
| if (n > activeFactories.size()) { | ||
| n = activeFactories.size(); | ||
| if (n > activeFactories.holder.size()) { |
Member
There was a problem hiding this comment.
Why not adding a size method in ActiveList?
Contributor
Author
|
@sgury I have addressed your comments. |
stevegury
approved these changes
Jan 9, 2017
NiteshKant
added a commit
that referenced
this pull request
Jan 9, 2017
* Event publishing for `LoadBalancer` __Problem__ No events are published for `LoadBalancer` __Modification__ Publishing events for `LoadBalancer` __Result__ More events, more insight!
ilayaperumalg
pushed a commit
to ilayaperumalg/rsocket-java
that referenced
this pull request
Dec 26, 2017
Replacing the dangling reference to LEASE_ERROR and replacing with REJECTED
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
No events are published for
LoadBalancerModification
Publishing events for
LoadBalancerResult
More events, more insight!