Class ServerGmsImpl

  • Direct Known Subclasses:
    CoordGmsImpl, ParticipantGmsImpl

    public abstract class ServerGmsImpl
    extends GmsImpl
    Common super class for CoordGmsImpl and ParticipantGmsImpl
    Author:
    Bela Ban
    • Constructor Detail

      • ServerGmsImpl

        protected ServerGmsImpl​(GMS gms)
    • Method Detail

      • init

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

        public void merge​(java.util.Map<Address,​View> views)
        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:
        views - A List of different views detected by the merge protocol
      • handleMergeRequest

        public void handleMergeRequest​(Address sender,
                                       MergeId merge_id,
                                       java.util.Collection<? extends Address> mbrs)
        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
        Parameters:
        sender - The address of the merge leader
        merge_id - The merge ID
        mbrs - The set of members from which we expect responses
      • handleViewChange

        public void handleViewChange​(View view,
                                     Digest digest)
        Called by the GMS when a VIEW is received.
        Overrides:
        handleViewChange in class GmsImpl
        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)