Class ParticipantGmsImpl


  • public class ParticipantGmsImpl
    extends ServerGmsImpl
    Author:
    Bela Ban
    • Constructor Detail

      • ParticipantGmsImpl

        public ParticipantGmsImpl​(GMS g)
    • Method Detail

      • init

        public void init()
                  throws java.lang.Exception
        Overrides:
        init in class ServerGmsImpl
        Throws:
        java.lang.Exception
      • leave

        public void leave()
        Specified by:
        leave in class GmsImpl
      • handleJoinResponse

        public void handleJoinResponse​(JoinRsp join_rsp)
        In case we get a different JOIN_RSP from a previous JOIN_REQ sent by us (as a client), we simply apply the new view if it is greater than ours
        Overrides:
        handleJoinResponse in class GmsImpl
      • unsuspect

        public void unsuspect​(Address mbr)
        Removes previously suspected member from list of currently suspected members
        Overrides:
        unsuspect in class GmsImpl
      • handleViewChange

        public void handleViewChange​(View view,
                                     Digest digest)
        Description copied from class: ServerGmsImpl
        Called by the GMS when a VIEW is received.
        Overrides:
        handleViewChange in class ServerGmsImpl
        Parameters:
        view - The view to be installed
        digest - If view is a MergeView, the digest contains the seqnos of all members and has to be set by GMS
      • wouldIBeCoordinator

        protected boolean wouldIBeCoordinator​(java.util.Collection<Address> leaving_mbrs)
        Determines whether this member is the new coordinator given a list of suspected members. This is computed as follows: the list of currently suspected members (suspected_mbrs) is removed from the current membership. If the first member of the resulting list is equals to the local_addr, then it is true, otherwise false. Example: own address is B, current membership is {A, B, C, D}, suspected members are {A, D}. The resulting list is {B, C}. The first member of {B, C} is B, which is equal to the local_addr. Therefore, true is returned.