org.javagroups.protocols
Class TOTAL_TOKEN
java.lang.Object
|
+--org.javagroups.stack.Protocol
|
+--org.javagroups.stack.MessageProtocol
|
+--org.javagroups.stack.RpcProtocol
|
+--org.javagroups.protocols.TOTAL_TOKEN
- All Implemented Interfaces:
- RequestHandler
- public class TOTAL_TOKEN
- extends RpcProtocol
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.
- Version:
- $Revision: 1.11 $
- Author:
- Vladimir Blagojevic vladimir@cs.yorku.ca
- See Also:
RingNodeFlowControl
,
RingNode
,
TcpRingNode
,
UdpRingNode
Field Summary |
static java.lang.String |
prot_name
|
Fields inherited from class org.javagroups.stack.Protocol |
down_handler, down_prot, down_queue, down_thread, observer, props, stack, up_handler, up_prot, up_queue, up_thread |
Methods inherited from class org.javagroups.stack.RpcProtocol |
callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethod, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, callRemoteMethods, handle |
Methods inherited from class org.javagroups.stack.Protocol |
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 |
prot_name
public static final java.lang.String prot_name
TOTAL_TOKEN
public TOTAL_TOKEN()
getName
public java.lang.String getName()
- Overrides:
getName
in class RpcProtocol
setProperties
public boolean setProperties(java.util.Properties props)
- Setup the Protocol instance acording to the configuration string
- Overrides:
setProperties
in class Protocol
getTokenReceiverAddress
public IpAddress getTokenReceiverAddress()
providedUpServices
public java.util.Vector providedUpServices()
- Description copied from class:
Protocol
- List of events that are provided to layers above (they will be handled when sent down from
above).
- Overrides:
providedUpServices
in class Protocol
- Following copied from class:
org.javagroups.stack.Protocol
- Returns:
- Vector (of Integers)
handleUpEvent
public boolean handleUpEvent(Event evt)
- Description copied from class:
RpcProtocol
- Handle up event. Return false if it should not be passed up the stack.
- Overrides:
handleUpEvent
in class RpcProtocol
handleDownEvent
public boolean handleDownEvent(Event evt)
- Description copied from class:
RpcProtocol
- Handle down event. Return false if it should not be passed down the stack.
- Overrides:
handleDownEvent
in class RpcProtocol
stop
protected void stop()
- Called when STOP_OK is percolated up
from the stacks below.
Overrides stop from MessageProtocol.
- Overrides:
stop
in class MessageProtocol
getAllReceivedUpTo
public long getAllReceivedUpTo()
installTransitionalView
public void installTransitionalView(java.util.Vector members)
updateView
protected void updateView(View newMembers)
- Overrides:
updateView
in class MessageProtocol
Copyright © 2001,2002 www.javagroups.com . All Rights Reserved.