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
mapCleared is added to EntryListener #2790
Conversation
There are some checkstyle issues. |
Looking into checkstyle. It is probably because some other checkstyle pr is merged in the process. :( |
I see that a related test is also failed. |
verify |
} | ||
getLocalMultiMapStatsImpl(event.getName()).incrementReceivedEvents(); | ||
} | ||
// public void dispatchEvent(MultiMapEvent event, EventListener listener) { |
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.
these should be removed I guess ?
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.
done.
return new EntryEvent<K, V>(name, member, | ||
event.getEventType().getType(), key, oldValue, value); | ||
} | ||
|
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 you can decrease code duplication later.
Can you do a rebase? |
My masters, as your humble servant, I accept your decision as order. I should be get to work then. |
verify |
mapCleared is added to EntryListener
for (Object o : resultMap.values()) { | ||
numberOfAffectedEntries += (Integer) o; | ||
} | ||
publishMapEvent(numberOfAffectedEntries, EntryEventType.CLEAR_ALL); |
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 you can also think about not to fire an event if a map is empty or has no affected entry.
Notes to reviewers:
On multimap clear, mapCleared method will be called. Before we were firing event for each key as removed.
When evictAll/clearAll is called from nodes, event will be fired in that node after all operations in partition threads finished
When evictAll/clearAll is called from clients , event will be fired in the remote node that request send in reduce phase meaning after all operations in partition threads returned.
Not sure what to do in webfilter leaved as todo.
Not sure what to do in beans for statistics leaved as todo.
Tests for multimap and map listeners related to evictAll and clearAll is added for both client and node. And even tested what happens if node is firing the event and client was the one listening.
Note for the client team(I will also add as issue to client issue lists ), PortableEntryEvent is changed, and should be changed accordingly in C++ and C# clients also.
fixes #2789