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.
-
UNIFORM()
-
-
Down(Event)
- An event is to be sent down the stack.
-
GetName()
-
-
Handle(Message)
-
1.
-
Receive(long)
-
-
Reset()
- Just remove if you don't need to reset any state
-
Send(Message)
-
-
SetProperties(Properties)
- Configures the protocol initially.
-
Up(Event)
- An event was received from the layer below.
UNIFORM
public UNIFORM()
GetName
public String GetName()
- Overrides:
- GetName in class Protocol
SetProperties
public boolean SetProperties(Properties props)
- Configures the protocol initially.
- Overrides:
- SetProperties in class Protocol
Reset
public void Reset()
- Just remove if you don't need to reset any state
- Overrides:
- Reset in class Protocol
Up
public void Up(Event evt)
- An event was received from the layer below.
- Overrides:
- Up in class Protocol
Down
public void Down(Event evt)
- An event is to be sent down the stack.
- Overrides:
- Down in class Protocol
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.
Send
public void Send(Message msg) throws Exception
Receive
public Object Receive(long timeout) throws Exception
All Packages Class Hierarchy This Package Previous Next Index