org.javagroups.protocols
Class UNIFORM
org.javagroups.protocols.UNIFORM
- public class UNIFORM
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.
Method Summary |
void |
down(org.javagroups.protocols.Event evt)
|
java.lang.String |
getName()
|
java.lang.Object |
handle(org.javagroups.protocols.Message msg)
1. |
java.lang.Object |
receive(long timeout)
|
void |
reset()
Just remove if you don't need to reset any state |
void |
send(org.javagroups.protocols.Message msg)
|
boolean |
setProperties(java.util.Properties props)
|
void |
up(org.javagroups.protocols.Event evt)
|
UNIFORM
public UNIFORM()
getName
public java.lang.String getName()
setProperties
public boolean setProperties(java.util.Properties props)
reset
public void reset()
- Just remove if you don't need to reset any state
up
public void up(org.javagroups.protocols.Event evt)
down
public void down(org.javagroups.protocols.Event evt)
handle
public java.lang.Object handle(org.javagroups.protocols.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(org.javagroups.protocols.Message msg)
throws java.lang.Exception
receive
public java.lang.Object receive(long timeout)
throws java.lang.Exception
Copyright © 2001,2002 www.javagroups.com . All Rights Reserved.