All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaGroups.JavaStack.Protocols.GMS

java.lang.Object
   |
   +----JavaGroups.JavaStack.Protocol
           |
           +----JavaGroups.JavaStack.Protocols.GMS

public class GMS
extends Protocol
implements Transport
Group Membership Service. The GMS finds the initial members, and then manages CONNECT, DISCONNECT, VIEW_CHANGE and SUSPECT events, i.e. it manages the group membership, joining new members, and broadcasting membership changes to all members. Only one of all GMS layers is the coordinator and therefore in charge of broadcasting membership changes. When the coordinator itself crashes, the remaining members elect a new coordinator to take over. The coordinator is always the first member of the membership list (which is an ordered sequence of member addresses, and is the same in all members).

Requires PING layer to retrieve initial membership (via IP MCAST or GOSSIP)


Variable Index

 o type

Constructor Index

 o GMS()

Method Index

 o Down(Event)
An event is to be sent down the stack.
 o GetGroupAddress()
 o GetLocalAddress()
 o GetName()
 o GetProtocolStack()
 o Receive(long)
Remove a message from the rsp_queue
 o RequiredDownServices()
List of events that are required to be answered by some layer below
 o Send(Message)
Used e.g.
 o SetProperties(Properties)
Setup the Protocol instance acording to the configuration string
 o toString()
 o Up(Event)
In case of a request, forward the message to the method invoker.

Variables

 o type
 public final int type

Constructors

 o GMS
 public GMS()

Methods

 o GetProtocolStack
 public ProtocolStack GetProtocolStack()
 o GetLocalAddress
 public Address GetLocalAddress()
 o GetGroupAddress
 public String GetGroupAddress()
 o GetName
 public String GetName()
Overrides:
GetName in class Protocol
 o Send
 public void Send(Message msg) throws Exception
Used e.g. by MethodInvoker to return a response. Tag the message with our type, this result in our the message being caught by the corresponding GMS layer in the other protocol stack(s). The assumption here is that all messages sent using the Send method will always only be sent to other GMSs ! If this is not the case, then the Down method should be used, with the type field set accordingly

 o Receive
 public Object Receive(long timeout) throws Exception
Remove a message from the rsp_queue

 o Up
 public void Up(Event evt)
In case of a request, forward the message to the method invoker. In case of a response, put it on the response queue, to be retrieved by later Receive() calls.

Overrides:
Up in class Protocol
 o Down
 public void Down(Event evt)
An event is to be sent down the stack.

Overrides:
Down in class Protocol
 o RequiredDownServices
 public Vector RequiredDownServices()
List of events that are required to be answered by some layer below

Overrides:
RequiredDownServices in class Protocol
 o SetProperties
 public boolean SetProperties(Properties props)
Setup the Protocol instance acording to the configuration string

Overrides:
SetProperties in class Protocol
 o toString
 public String toString()
Overrides:
toString in class Object

All Packages  Class Hierarchy  This Package  Previous  Next  Index