|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||
java.lang.Object
|
+--org.javagroups.stack.Protocol
|
+--org.javagroups.stack.MessageProtocol
|
+--org.javagroups.stack.RpcProtocol
|
+--org.javagroups.protocols.TOTAL_TOKEN
Total order implementation based on The Totem Single-Ring Ordering and Membership Protocol
However, this is an adaption of algorithm mentioned in the research paper above since we reuse our own membership protocol and failure detectors. Somewhat different flow control mechanism is also implemented.
Token passing is done through reliable point-to-point udp channels provided by UNICAST layer. Process groups nodes members are organized in a logical ring.
Total token layer doesn't need NAKACK nor STABLE layer beneath it since it implements it's own retransmission and tracks stability of the messages from the information piggybacked on the token itself.
For the typical protocol stack configuration used, see org.javagroups.demos.TotalTokenDemo and total-token.xml configuration file provided with this distribution of JavaGroups.
RingNodeFlowControl,
RingNode,
TcpRingNode,
UdpRingNode| Nested Class Summary | |
|---|---|
static class |
TOTAL_TOKEN.RingTokenHeader
|
static class |
TOTAL_TOKEN.TotalTokenHeader
|
| Field Summary | |
|---|---|
static java.lang.String |
prot_name
|
| Fields inherited from class org.javagroups.stack.MessageProtocol |
|---|
_corr, members |
| Fields inherited from class org.javagroups.stack.Protocol |
|---|
down_handler, down_prot, down_queue, down_thread, down_thread_prio, observer, props, stack, up_handler, up_prot, up_queue, up_thread, up_thread_prio |
| Constructor Summary | |
|---|---|
TOTAL_TOKEN()
|
|
| Method Summary | |
|---|---|
long |
getAllReceivedUpTo()
|
java.lang.String |
getName()
|
IpAddress |
getTokenReceiverAddress()
|
boolean |
handleDownEvent(Event evt)
Handle down event. |
boolean |
handleUpEvent(Event evt)
Handle up event. |
void |
installTransitionalView(java.util.Vector members)
|
java.util.Vector |
providedUpServices()
List of events that are provided to layers above (they will be handled when sent down from above). |
boolean |
setProperties(java.util.Properties props)
Setup the Protocol instance acording to the configuration string |
void |
start()
This method is called on a Channel.connect(String). |
void |
stop()
Overrides @org.javagroups.stack.MessageProtocol#stop(). |
protected void |
updateView(View newMembers)
|
| Methods inherited from class org.javagroups.stack.RpcProtocol |
|---|
callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, handle |
| Methods inherited from class org.javagroups.stack.MessageProtocol |
|---|
castMessage, down, sendMessage, up |
| Methods inherited from class org.javagroups.stack.Protocol |
|---|
destroy, getDownProtocol, getDownQueue, getProperties, getUpProtocol, getUpQueue, init, passDown, passUp, providedDownServices, receiveDownEvent, receiveUpEvent, requiredDownServices, requiredUpServices, setDownProtocol, setObserver, setPropertiesInternal, setProtocolStack, setUpProtocol, startDownHandler, startUpHandler, stopInternal |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String prot_name
| Constructor Detail |
public TOTAL_TOKEN()
| Method Detail |
public java.lang.String getName()
getName in class RpcProtocol
public void start()
throws java.lang.Exception
ProtocolChannel.connect(String). Starts work.
Protocols are connected and queues are ready to receive events.
Will be called from bottom to top. This call will replace
the START and START_OK events.
start in class MessageProtocoljava.lang.Exception - Thrown if protocol cannot be started successfully. This will cause the ProtocolStack
to fail, so Channel.connect(String) will throw an exceptionpublic void stop()
stop in class MessageProtocolpublic boolean setProperties(java.util.Properties props)
setProperties in class Protocolpublic IpAddress getTokenReceiverAddress()
public java.util.Vector providedUpServices()
Protocol
providedUpServices in class Protocolpublic boolean handleUpEvent(Event evt)
RpcProtocol
handleUpEvent in class RpcProtocolpublic boolean handleDownEvent(Event evt)
RpcProtocol
handleDownEvent in class RpcProtocolpublic long getAllReceivedUpTo()
public void installTransitionalView(java.util.Vector members)
protected void updateView(View newMembers)
updateView in class MessageProtocol
|
||||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||||