|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.jgroups.protocols.pbcast.Merger
public class Merger
Handles merging. Called by CoordGmsImpl and ParticipantGmsImpl
Field Summary | |
---|---|
protected BoundedList<MergeId> |
merge_id_history
|
Constructor Summary | |
---|---|
Merger(GMS gms)
|
Method Summary | |
---|---|
protected void |
_handleMergeRequest(Address sender,
MergeId merge_id,
java.util.Collection<? extends Address> mbrs)
|
MergeId |
getMergeId()
Only used for testing, might get removed any time. |
java.lang.String |
getMergeIdAsString()
|
java.lang.String |
getMergeIdHistory()
|
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)
If merge_id is not equal to this.merge_id then discard. |
boolean |
isMergeInProgress()
|
boolean |
matchMergeId(MergeId id)
|
void |
merge(java.util.Map<Address,View> views)
Invoked upon receiving a MERGE event from the MERGE layer. |
static void |
sanitizeViews(java.util.Map<Address,View> map)
Removes all members from a given view which don't have us in their view (https://jira.jboss.org/browse/JGRP-1061). |
protected void |
sendMergeRejectedResponse(Address sender,
MergeId merge_id)
|
boolean |
setMergeId(MergeId expected,
MergeId new_value)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final BoundedList<MergeId> merge_id_history
Constructor Detail |
---|
public Merger(GMS gms)
Method Detail |
---|
public java.lang.String getMergeIdAsString()
public java.lang.String getMergeIdHistory()
public void merge(java.util.Map<Address,View> views)
views
- A List of different views detected by the merge protocolpublic void handleMergeRequest(Address sender, MergeId merge_id, java.util.Collection<? extends Address> mbrs)
sender
- The address of the merge leadermerge_id
- The merge IDmbrs
- The set of members from which we expect responsesprotected void _handleMergeRequest(Address sender, MergeId merge_id, java.util.Collection<? extends Address> mbrs) throws java.lang.Exception
java.lang.Exception
public void handleMergeResponse(MergeData data, MergeId merge_id)
public void handleMergeView(MergeData data, MergeId merge_id)
public void handleMergeCancelled(MergeId merge_id)
public void handleDigestResponse(Address sender, Digest digest)
public static void sanitizeViews(java.util.Map<Address,View> map)
A: AB B: AB C: ABCbecomes
A: AB B: AB C: C // A and B don't have C in their views
map
- A map of members and their associated viewsprotected void sendMergeRejectedResponse(Address sender, MergeId merge_id)
public boolean setMergeId(MergeId expected, MergeId new_value)
public MergeId getMergeId()
public boolean isMergeInProgress()
public boolean matchMergeId(MergeId id)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |