[jboss-jira] [JBoss JIRA] (WFLY-9547) Extract immutable Membership abstraction from Group API
Paul Ferraro (JIRA)
issues at jboss.org
Sat Nov 11 17:35:00 EST 2017
Paul Ferraro created WFLY-9547:
----------------------------------
Summary: Extract immutable Membership abstraction from Group API
Key: WFLY-9547
URL: https://issues.jboss.org/browse/WFLY-9547
Project: WildFly
Issue Type: Enhancement
Components: Clustering
Affects Versions: 11.0.0.Final
Reporter: Paul Ferraro
Assignee: Paul Ferraro
The Group abstraction has a number of methods specific to a group membership:
* getNodes()
* isCoordinator()
* getCoordinatorNode()
However, sequential invocations of these methods can return inconsistent results, since the membership can change at any time. This is not ideal.
Instead, we should introduce an immutable Membership abstraction, such that, within the context of a given membership, the above methods return consistent results.
The Membership maps well onto the JGroups concept of a View and Infinispan's concept of a cache topology. Consequently, this Membership should be hashable and comparable based on the underlying view/topology id.
The above methods in Group will be replaced with a new getMembership() which returns a volatile reference to the current membership.
Additionally, the membershipChanged(...) event should be enhanced to leverage this new Membership abstraction.
e.g.
void membershipChanged(Membership previousMembership, Membership currentMembership, boolean merged)
This allows the listener to easily determine the previous coordinator vs the new coordinator.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
More information about the jboss-jira
mailing list