Class CoordGmsImpl

java.lang.Object
org.jgroups.protocols.pbcast.GmsImpl
org.jgroups.protocols.pbcast.CoordGmsImpl

public class CoordGmsImpl extends GmsImpl
Coordinator role of the Group MemberShip (GMS) protocol. Accepts JOIN and LEAVE requests and emits view changes accordingly.
Author:
Bela Ban
  • Constructor Details

    • CoordGmsImpl

      public CoordGmsImpl(GMS g)
  • Method Details

    • init

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

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

      public void joinWithStateTransfer(Address mbr)
      Specified by:
      joinWithStateTransfer in class GmsImpl
    • leave

      public void leave(Address mbr)
      The coordinator itself wants to leave the group
      Specified by:
      leave in class GmsImpl
    • handleJoinResponse

      public void handleJoinResponse(JoinRsp join_rsp)
      Specified by:
      handleJoinResponse in class GmsImpl
    • handleLeaveResponse

      public void handleLeaveResponse()
      Specified by:
      handleLeaveResponse in class GmsImpl
    • suspect

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

      public void unsuspect(Address mbr)
      Specified by:
      unsuspect in class GmsImpl
    • merge

      public void merge(Vector<Address> other_coords)
      Invoked upon receiving a MERGE event from the MERGE layer. Starts the merge protocol. See description of protocol in DESIGN.
      Overrides:
      merge in class GmsImpl
      Parameters:
      other_coords - A list of coordinators (including myself) found by MERGE protocol
    • handleMergeRequest

      public void handleMergeRequest(Address sender, ViewId merge_id)
      Get the view and digest and send back both (MergeData) in the form of a MERGE_RSP to the sender. If a merge is already in progress, send back a MergeData with the merge_rejected field set to true.
      Overrides:
      handleMergeRequest in class GmsImpl
    • handleMergeResponse

      public void handleMergeResponse(MergeData data, ViewId merge_id)
      Overrides:
      handleMergeResponse in class GmsImpl
    • handleDigestResponse

      public void handleDigestResponse(Address sender, Digest digest)
      Overrides:
      handleDigestResponse in class GmsImpl
    • handleMergeView

      public void handleMergeView(MergeData data, ViewId merge_id)
      If merge_id is not equal to this.merge_id then discard. Else cast the view/digest to all members of this group.
      Overrides:
      handleMergeView in class GmsImpl
    • handleMergeCancelled

      public void handleMergeCancelled(ViewId merge_id)
      Overrides:
      handleMergeCancelled in class GmsImpl
    • handleMembershipChange

      public void handleMembershipChange(Collection<GmsImpl.Request> requests)
      Specified by:
      handleMembershipChange in class GmsImpl
    • handleViewChange

      public void handleViewChange(View new_view, Digest digest)
      Called by the GMS when a VIEW is received.
      Specified by:
      handleViewChange in class GmsImpl
      Parameters:
      new_view - The view to be installed
      digest - If view is a MergeView, digest contains the seqno digest of all members and has to be set by GMS
    • handleExit

      public void handleExit()
      Overrides:
      handleExit in class GmsImpl
    • stop

      public void stop()
      Overrides:
      stop in class GmsImpl