Class ParticipantGmsImpl


public class ParticipantGmsImpl extends ServerGmsImpl
  • Field Details

  • Constructor Details

    • ParticipantGmsImpl

      public ParticipantGmsImpl(GMS g)
  • Method Details

    • init

      public void init() throws Exception
      Overrides:
      init in class ServerGmsImpl
      Throws:
      Exception
    • join

      public void join(Address mbr, boolean useFlushIfPresent)
      Specified by:
      join in class GmsImpl
    • joinWithStateTransfer

      public void joinWithStateTransfer(Address mbr, boolean useFlushIfPresent)
      Specified by:
      joinWithStateTransfer in class GmsImpl
    • 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
    • suspect

      public void suspect(Address mbr)
      Overrides:
      suspect in class GmsImpl
    • unsuspect

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

      public void handleMembershipChange(Collection<GmsImpl.Request> requests)
      Overrides:
      handleMembershipChange 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
    • coordChanged

      protected void coordChanged(Address from, Address to)
      Overrides:
      coordChanged in class ServerGmsImpl
    • wouldIBeCoordinator

      protected boolean wouldIBeCoordinator(Collection<Address> leaving_mbrs, Collection<Address> suspected_members)
      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.