public class TOTAL_OLD extends Protocol
Modifier and Type | Class and Description |
---|---|
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
|
down_handler, down_prot, down_queue, down_thread, down_thread_prio, observer, props, stack, stats, up_handler, up_prot, up_queue, up_thread, up_thread_prio
Constructor and Description |
---|
TOTAL_OLD() |
Modifier and Type | Method and Description |
---|---|
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., the lowest seq id queued).
|
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() |
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
|
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
|
destroy, downThreadEnabled, dumpStats, enableStats, getDownProtocol, getDownQueue, getProperties, getUpProtocol, getUpQueue, handleSpecialDownEvent, init, passDown, passUp, printStats, providedDownServices, providedUpServices, receiveDownEvent, receiveUpEvent, requiredDownServices, requiredUpServices, resetStats, setDownProtocol, setObserver, setProperties, setPropertiesInternal, setProtocolStack, setUpProtocol, startDownHandler, startUpHandler, statsEnabled, stopInternal, upThreadEnabled
public java.lang.String getName()
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 Protocol
java.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()
Protocol
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 flushedpublic void reset()
protected long getNextSeqID()
protected long getFirstQueuedSeqID()
public void up(Event evt)
public void down(Event evt)
protected Address getLocalAddr()
protected Address getSequencer()
Copyright ? 1998-2006 Bela Ban. All Rights Reserved.