org.jgroups.protocols
Class TOTAL_OLD

java.lang.Object
  extended byorg.jgroups.stack.Protocol
      extended byorg.jgroups.protocols.TOTAL_OLD

public class TOTAL_OLD
extends Protocol

class TOTAL_OLD extends Protocol TODO: (more comments) Sequencer based total ordering protocol layer - requires the following layers "below" it in the stack (or layers with equivalent functionality): GMS, FD, PING, UDP, ...

Author:
Manish Sambhu mms21@cornell.edu Spring 1999

Nested Class Summary
static class TOTAL_OLD.TotalHeader
          class TotalHeader The header that is prepended to every message passed down through the TOTAL_OLD layer and removed (and processed) from every message passed up through the TOTAL_OLD layer
 
Field Summary
 
Fields inherited from class org.jgroups.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_OLD()
           
 
Method Summary
 void down(Event evt)
          handles an Event coming down the Protocol Stack
protected  long getFirstQueuedSeqID()
          returns the sequence id of the "first" queued message (i.e.
protected  Address getLocalAddr()
          returns the Address of the local machine returns null if it is not known yet
 java.lang.String getName()
          returns the unique name of this protocol
protected  long getNextSeqID()
          returns the next sequence id expected to be received in this view
protected  Address getSequencer()
          returns the address of the current sequencer of the group returns null if the list of members is empty
 void reset()
          Just remove if you don't need to reset any state
 boolean setProperties(java.util.Properties props)
          Configures the protocol initially.
 void start()
          This method is called on a Channel.connect(String).
 void stop()
          This method is called on a Channel.disconnect().
 void up(Event evt)
          handles an Event coming up the Protocol Stack
 
Methods inherited from class org.jgroups.stack.Protocol
destroy, getDownProtocol, getDownQueue, getProperties, getUpProtocol, getUpQueue, init, passDown, passUp, providedDownServices, providedUpServices, 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
 

Constructor Detail

TOTAL_OLD

public TOTAL_OLD()
Method Detail

getName

public java.lang.String getName()
returns the unique name of this protocol

Specified by:
getName in class Protocol

setProperties

public boolean setProperties(java.util.Properties props)
Description copied from class: Protocol
Configures the protocol initially. A configuration string consists of name=value items, separated by a ';' (semicolon), e.g.:
 "loopback=false;unicast_inport=4444"
 

Overrides:
setProperties in class Protocol

start

public void start()
           throws java.lang.Exception
Description copied from class: Protocol
This method is called on a 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.

Overrides:
start in class Protocol
Throws:
java.lang.Exception - Thrown if protocol cannot be started successfully. This will cause the ProtocolStack to fail, so Channel.connect(String) will throw an exception

stop

public void stop()
Description copied from class: Protocol
This method is called on a Channel.disconnect(). Stops work (e.g. by closing multicast socket). Will be called from top to bottom. This means that at the time of the method invocation the neighbor protocol below is still working. This method will replace the STOP, STOP_OK, CLEANUP and CLEANUP_OK events. The ProtocolStack guarantees that when this method is called all messages in the down queue will have been flushed

Overrides:
stop in class Protocol

reset

public void reset()
Just remove if you don't need to reset any state


getNextSeqID

protected long getNextSeqID()
returns the next sequence id expected to be received in this view


getFirstQueuedSeqID

protected long getFirstQueuedSeqID()
returns the sequence id of the "first" queued message (i.e. the lowest seq id queued) returns -1 if no messages are queued


up

public void up(Event evt)
handles an Event coming up the Protocol Stack

Overrides:
up in class Protocol

down

public void down(Event evt)
handles an Event coming down the Protocol Stack

Overrides:
down in class Protocol

getLocalAddr

protected Address getLocalAddr()
returns the Address of the local machine returns null if it is not known yet


getSequencer

protected Address getSequencer()
returns the address of the current sequencer of the group returns null if the list of members is empty



Copyright © 2001,2002 www.jgroups.com . All Rights Reserved.