Package org.jgroups.protocols.pbcast
Class ServerGmsImpl
- java.lang.Object
-
- org.jgroups.protocols.pbcast.GmsImpl
-
- org.jgroups.protocols.pbcast.ServerGmsImpl
-
- Direct Known Subclasses:
CoordGmsImpl
,ParticipantGmsImpl
public abstract class ServerGmsImpl extends GmsImpl
Common super class for CoordGmsImpl and ParticipantGmsImpl- Author:
- Bela Ban
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jgroups.protocols.pbcast.GmsImpl
GmsImpl.Request
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
ServerGmsImpl(GMS gms)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
coordChanged(Address from, Address to)
void
handleDigestResponse(Address sender, Digest digest)
void
handleMergeCancelled(MergeId merge_id)
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.void
handleMergeResponse(MergeData data, MergeId merge_id)
void
handleMergeView(MergeData data, MergeId merge_id)
void
handleViewChange(View view, Digest digest)
Called by the GMS when a VIEW is received.void
init()
void
merge(java.util.Map<Address,View> views)
Invoked upon receiving a MERGE event from the MERGE layer.-
Methods inherited from class org.jgroups.protocols.pbcast.GmsImpl
handleCoordLeave, handleJoinResponse, handleLeaveResponse, handleMembershipChange, join, joinWithStateTransfer, leave, sendMergeRejectedResponse, start, stop, suspect, unsuspect, wrongMethod
-
-
-
-
Constructor Detail
-
ServerGmsImpl
protected ServerGmsImpl(GMS gms)
-
-
Method Detail
-
init
public void init() 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.
-
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 classGmsImpl
- Parameters:
sender
- The address of the merge leadermerge_id
- The merge IDmbrs
- The set of members from which we expect responses
-
handleMergeResponse
public void handleMergeResponse(MergeData data, MergeId merge_id)
- Overrides:
handleMergeResponse
in classGmsImpl
-
handleMergeCancelled
public void handleMergeCancelled(MergeId merge_id)
- Overrides:
handleMergeCancelled
in classGmsImpl
-
handleViewChange
public void handleViewChange(View view, Digest digest)
Called by the GMS when a VIEW is received.- Overrides:
handleViewChange
in classGmsImpl
- Parameters:
view
- The view to be installeddigest
- If view is a MergeView, the digest contains the seqnos of all members and has to be set by GMS
-
handleMergeView
public void handleMergeView(MergeData data, MergeId merge_id)
- Overrides:
handleMergeView
in classGmsImpl
-
handleDigestResponse
public void handleDigestResponse(Address sender, Digest digest)
- Overrides:
handleDigestResponse
in classGmsImpl
-
-