public interface MembershipChangePolicy
GMS
to override the default policy, which adds new members at the end on
a regular membership change, and adds all subviews into a new membership which is lexically sorted in case
of a merge.Modifier and Type | Method and Description |
---|---|
java.util.List<Address> |
getNewMembership(java.util.Collection<Address> current_members,
java.util.Collection<Address> joiners,
java.util.Collection<Address> leavers,
java.util.Collection<Address> suspects)
Computes a new membership based on existing, joining, leaving and suspected members.
|
java.util.List<Address> |
getNewMembership(java.util.Collection<java.util.Collection<Address>> subviews)
Compute a new membership based on a number of subviews
|
java.util.List<Address> getNewMembership(java.util.Collection<Address> current_members, java.util.Collection<Address> joiners, java.util.Collection<Address> leavers, java.util.Collection<Address> suspects)
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)java.util.List<Address> getNewMembership(java.util.Collection<java.util.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)Copyright © 1998-2020 Red Hat. All Rights Reserved.