All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaGroups.JavaStack.Protocols.UNIFORM

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

public class UNIFORM
extends Protocol
implements RequestHandler, Transport
The algorithms implements dynamically-uniform failure-atomic group multicast, that is, a message is delivered by all members if it is delivered by at least 1 non-faulty member even if the sender crashes after sending. If the sender crashes, it will eventually be removed from the group membership: the FLUSH protocol preceding the view change causes all pending multicasts to be flushed out of the system, thereby re-sending pending multicasts to members that haven't received them yet.

The protocol makes use of GroupRequest (which itself uses RequestCorrelator) to send a request to all members and receive responses from all non-faulty members.


Constructor Index

 o UNIFORM()

Method Index

 o Down(Event)
An event is to be sent down the stack.
 o GetName()
 o Handle(Message)
1.
  
 o Receive(long)
 o Reset()
Just remove if you don't need to reset any state
 o Send(Message)
 o SetProperties(Properties)
Configures the protocol initially.
 o Up(Event)
An event was received from the layer below.

Constructors

 o UNIFORM
 public UNIFORM()

Methods

 o GetName
 public String GetName()
Overrides:
GetName in class Protocol
 o SetProperties
 public boolean SetProperties(Properties props)
Configures the protocol initially.

Overrides:
SetProperties in class Protocol
 o Reset
 public void Reset()
Just remove if you don't need to reset any state

Overrides:
Reset in class Protocol
 o Up
 public void Up(Event evt)
An event was received from the layer below.

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 Handle
 public Object Handle(Message msg)
1. Remove UniformHeader from message and get ID and type
2. If type == SAVE: add message to save-table (key=sender + ID) and send response (SAVE_OK)
If type == OK:   add message to ok-table, remove from save-table. Deliver message (pass up
the stack) and send response (OK_OK).
If type == SEEN: find message in ok-table. If found, send SEEN_OK response, else NOT_SEEN.
If type == GC: delete message from ok-table.

 o Send
 public void Send(Message msg) throws Exception
 o Receive
 public Object Receive(long timeout) throws Exception

All Packages  Class Hierarchy  This Package  Previous  Next  Index