public static class GMS.DefaultMembershipPolicy extends Object implements MembershipChangePolicy
Constructor and Description |
---|
DefaultMembershipPolicy() |
Modifier and Type | Method and Description |
---|---|
List<Address> |
getNewMembership(Collection<Address> current_members,
Collection<Address> joiners,
Collection<Address> leavers,
Collection<Address> suspects)
Takes the existing membership list and removes suspected and left members, then adds new
members to the end of the list
|
List<Address> |
getNewMembership(Collection<Collection<Address>> subviews)
Default implementation for a merge.
|
static List<Address> |
getNewMembershipOld(Collection<Collection<Address>> subviews)
Old default implementation for a merge.
|
public List<Address> getNewMembership(Collection<Address> current_members, Collection<Address> joiners, Collection<Address> leavers, Collection<Address> suspects)
getNewMembership
in interface MembershipChangePolicy
current_members
- The list of current members. Guaranteed to be non-null (but may be empty)joiners
- The joining members. Guaranteed to be non-null (but may be empty)leavers
- Members that are leaving. Guaranteed to be non-null (but may be empty)suspects
- Members which are suspected. Guaranteed to be non-null (but may be empty)public static List<Address> getNewMembershipOld(Collection<Collection<Address>> subviews)
subviews
- A list of membership lists, e.g. [{A,B,C}, {M,N,O,P}, {X,Y,Z}]. This is a merge between
3 subviews. Guaranteed to be non-null (but may be empty)public List<Address> getNewMembership(Collection<Collection<Address>> subviews)
getNewMembership
in interface MembershipChangePolicy
subviews
- A list of membership lists, e.g. [{A,B,C}, {M,N,O,P}, {X,Y,Z}]. This is a merge between
3 subviews. Guaranteed to be non-null (but may be empty)Copyright © 2018 JBoss, a division of Red Hat. All rights reserved.