|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgroups.stack.Protocol
org.jgroups.stack.MessageProtocol
org.jgroups.stack.RpcProtocol
org.jgroups.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.jgroups.demos.TotalTokenDemo and total-token.xml configuration file provided with this distribution of JGroups.
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.jgroups.stack.MessageProtocol |
_corr, members |
Fields inherited from class org.jgroups.stack.Protocol |
down_handler, down_prot, down_queue, down_thread, down_thread_prio, log, observer, props, stack, stats, trace, up_handler, up_prot, up_queue, up_thread, up_thread_prio, warn |
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.jgroups.stack.MessageProtocol#stop(). |
protected void |
updateView(View newMembers)
|
Methods inherited from class org.jgroups.stack.RpcProtocol |
callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethods, callRemoteMethods, callRemoteMethods, handle |
Methods inherited from class org.jgroups.stack.MessageProtocol |
castMessage, down, sendMessage, up |
Methods inherited from class org.jgroups.stack.Protocol |
destroy, downThreadEnabled, dumpStats, enableStats, getDownProtocol, getDownQueue, getProperties, getUpProtocol, getUpQueue, handleSpecialDownEvent, init, isTrace, isWarn, passDown, passUp, printStats, providedDownServices, receiveDownEvent, receiveUpEvent, requiredDownServices, requiredUpServices, resetStats, setDownProtocol, setObserver, setPropertiesInternal, setProtocolStack, setTrace, setUpProtocol, setWarn, startDownHandler, startUpHandler, statsEnabled, stopInternal, upThreadEnabled |
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
Protocol
Channel.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 MessageProtocol
java.lang.Exception
public void stop()
stop
in class MessageProtocol
public boolean setProperties(java.util.Properties props)
setProperties
in class Protocol
public IpAddress getTokenReceiverAddress()
public java.util.Vector providedUpServices()
Protocol
providedUpServices
in class Protocol
public boolean handleUpEvent(Event evt)
RpcProtocol
handleUpEvent
in class RpcProtocol
public boolean handleDownEvent(Event evt)
RpcProtocol
handleDownEvent
in class RpcProtocol
public 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 |