org.jgroups.protocols

Class MERGE2


public class MERGE2
extends Protocol

Protocol to discover subgroups, e.g. existing due to a network partition (that healed). Example: group {p,q,r,s,t,u,v,w} is split into 3 subgroups {p,q}, {r,s,t,u} and {v,w}. This protocol will eventually send a MERGE event with the coordinators of each subgroup up the stack: {p,r,v}. Note that - depending on the time of subgroup discovery - there could also be 2 MERGE events, which first join 2 of the subgroups, and then the resulting group to the last subgroup. The real work of merging the subgroups into one larger group is done somewhere above this protocol (typically in the GMS protocol).

This protocol works as follows:

Requires: FIND_INITIAL_MBRS event from below
Provides: sends MERGE event with list of coordinators up the stack

Author:
Bela Ban, Oct 16 2001

Field Summary

Fields inherited from class org.jgroups.stack.Protocol

down_handler, down_prot, down_queue, down_thread, down_thread_prio, log, observer, props, stack, up_handler, up_prot, up_queue, up_thread, up_thread_prio

Method Summary

void
down(Event evt)
String
getName()
Vector
requiredDownServices()
boolean
setProperties(Properties props)
void
startDownHandler()
DON'T REMOVE ! This prevents the down-handler thread to be created, which is not needed in the protocol.
void
startUpHandler()
DON'T REMOVE ! This prevents the up-handler thread to be created, which is not needed in the protocol.
void
stop()
void
up(Event evt)

Methods inherited from class org.jgroups.stack.Protocol

destroy, down, getDownProtocol, getDownQueue, getName, getProperties, getUpProtocol, getUpQueue, handleSpecialDownEvent, init, passDown, passUp, providedDownServices, providedUpServices, receiveDownEvent, receiveUpEvent, requiredDownServices, requiredUpServices, setDownProtocol, setObserver, setProperties, setPropertiesInternal, setProtocolStack, setUpProtocol, start, startDownHandler, startUpHandler, stop, stopInternal, up

Method Details

down

public void down(Event evt)
Overrides:
down in interface Protocol


getName

public String getName()
Overrides:
getName in interface Protocol


requiredDownServices

public Vector requiredDownServices()
Overrides:
requiredDownServices in interface Protocol


setProperties

public boolean setProperties(Properties props)
Overrides:
setProperties in interface Protocol


startDownHandler

public void startDownHandler()
DON'T REMOVE ! This prevents the down-handler thread to be created, which is not needed in the protocol.
Overrides:
startDownHandler in interface Protocol


startUpHandler

public void startUpHandler()
DON'T REMOVE ! This prevents the up-handler thread to be created, which is not needed in the protocol.
Overrides:
startUpHandler in interface Protocol


stop

public void stop()
Overrides:
stop in interface Protocol


up

public void up(Event evt)
Overrides:
up in interface Protocol


Copyright B) 2001,2002 www.jgroups.com . All Rights Reserved.