You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Ryker Zhang (JIRA)" <ji...@apache.org> on 2019/04/18 09:01:00 UTC
[jira] [Assigned] (IGNITE-11676) Clean up custom event callbacks
[ https://issues.apache.org/jira/browse/IGNITE-11676?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryker Zhang reassigned IGNITE-11676:
------------------------------------
Assignee: Ryker Zhang
> Clean up custom event callbacks
> -------------------------------
>
> Key: IGNITE-11676
> URL: https://issues.apache.org/jira/browse/IGNITE-11676
> Project: Ignite
> Issue Type: Improvement
> Reporter: Alexey Goncharuk
> Assignee: Ryker Zhang
> Priority: Major
>
> Currently, {{GridDiscoveryManager}} has several ways of notifying Ignite components of discovery events:
> * Line 668: a set of {{instanceof}} statements to invoke specific callbacks for components (for example, {{ctx.state().onStateChangeMessage(...)}}, {{ctx.cache().onCustomEvent(...)}}
> * Later, on line 715: we call a somewhat generic custom event listeners
> * Finally, on line 876, if the custom message was of a specific type, we fire EVT_DISCOVERY_CUSTOM_EVT
> Overall, this is a huge abstraction leak, and all non-discovery specifics should be eliminated from {{GridDiscoveryManager}}. I suggest the following:
> 1) Change {{CustomEventListener}} to have two methods: one of them should return {{true}} or {{false}} to determine whether the minor topology version should be incremented
> 2) Move all logic to corresponding components
> 3) Get rid of code on line 876, I see no need in this. Also, consider removing {{EVT_DISCOVERY_CUSTOM_EVT}}, as this is private API and should now be covered by the specific listener
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)