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

mapCleared is added to EntryListener #2790

Merged
merged 11 commits into from Jun 24, 2014

Conversation

sancar
Copy link
Contributor

@sancar sancar commented Jun 22, 2014

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

@sancar sancar added this to the 3.3 milestone Jun 22, 2014
@sancar sancar self-assigned this Jun 22, 2014
@pveentjer
Copy link
Contributor

There are some checkstyle issues.

@sancar
Copy link
Contributor Author

sancar commented Jun 23, 2014

Looking into checkstyle. It is probably because some other checkstyle pr is merged in the process. :(

@sancar
Copy link
Contributor Author

sancar commented Jun 23, 2014

I see that a related test is also failed.

@sancar
Copy link
Contributor Author

sancar commented Jun 23, 2014

verify

}
getLocalMultiMapStatsImpl(event.getName()).incrementReceivedEvents();
}
// public void dispatchEvent(MultiMapEvent event, EventListener listener) {
Copy link
Contributor

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 ?

Copy link
Contributor Author

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);
}

Copy link
Member

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.

@pveentjer
Copy link
Contributor

Can you do a rebase?

@sancar
Copy link
Contributor Author

sancar commented Jun 24, 2014

My masters, as your humble servant, I accept your decision as order. I should be get to work then.

@sancar
Copy link
Contributor Author

sancar commented Jun 24, 2014

verify

enesakar added a commit that referenced this pull request Jun 24, 2014
mapCleared is added to EntryListener
@enesakar enesakar merged commit 17c13be into hazelcast:master Jun 24, 2014
for (Object o : resultMap.values()) {
numberOfAffectedEntries += (Integer) o;
}
publishMapEvent(numberOfAffectedEntries, EntryEventType.CLEAR_ALL);
Copy link
Member

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.

@sancar sancar deleted the addClearAll/master branch July 10, 2014 09:18
@mmedenjak mmedenjak added the Source: Internal PR or issue was opened by an employee label Apr 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Source: Internal PR or issue was opened by an employee Team: Client Type: Enhancement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

mapCleared method for EntryListener
7 participants