Package org.jgroups.stack
Class LargestWinningPolicy
- java.lang.Object
-
- org.jgroups.protocols.pbcast.GMS.DefaultMembershipPolicy
-
- org.jgroups.stack.LargestWinningPolicy
-
- All Implemented Interfaces:
MembershipChangePolicy
public class LargestWinningPolicy extends GMS.DefaultMembershipPolicy
Policy which picks the new coordinator in a merge from the largest subview. JIRA: https://issues.jboss.org/browse/JGRP-1976- Since:
- 3.6.7
- Author:
- Osamu Nagano
-
-
Constructor Summary
Constructors Constructor Description LargestWinningPolicy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.List<Address>
getNewMembership(java.util.Collection<java.util.Collection<Address>> subviews)
Called when a merge happened.-
Methods inherited from class org.jgroups.protocols.pbcast.GMS.DefaultMembershipPolicy
getNewMembership, getNewMembershipOld
-
-
-
-
Method Detail
-
getNewMembership
public java.util.List<Address> getNewMembership(java.util.Collection<java.util.Collection<Address>> subviews)
Called when a merge happened. The largest subview wins.- Specified by:
getNewMembership
in interfaceMembershipChangePolicy
- Overrides:
getNewMembership
in classGMS.DefaultMembershipPolicy
- Parameters:
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)- Returns:
- The new membership. Needs to be non-null and cannot contain duplicates
-
-