All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class JavaGroups.JavaStack.Protocols.MNAK

java.lang.Object
   |
   +----JavaGroups.JavaStack.Protocol
           |
           +----JavaGroups.JavaStack.Protocols.MNAK

public class MNAK
extends Protocol
implements SlidingWindow. RetransmitCommand

Constructor Index

 o MNAK()

Method Index

 o Down(Event)
Tag every message that is a multicast message (dest is null) with an MnakHeader, containing a sequence number.
 o GetName()
 o Reset()
Just remove if you don't need to reset any state
 o Retransmit(long, Object, boolean, boolean)
Method called by sliding window when it need to 'fill' a gap between sequence numbers.
 o SetProperties(Properties)
Setup the Protocol instance acording to the configuration string
 o Up(Event)
Remove the MnakHeader.

Constructors

 o MNAK
 public MNAK()

Methods

 o Retransmit
 public synchronized void Retransmit(long retransmit_no,
                                     Object sender,
                                     boolean mcast_to_group,
                                     boolean suspect)
Method called by sliding window when it need to 'fill' a gap between sequence numbers.

Parameters:
retransmit_no - The sequence number of the message that is missing
sender - The original sender of the message. This and retransmit_no identify every message uniquely.
mcast_to_group - Mcast (instead of ucast) the message to all group members. This happens when 2 successive ucasts were not successful
suspect - Suspect sender. This happens when even the mcast was not successful. (no group member had a copy of the message). Highly unlikely !
 o GetName
 public String GetName()
Overrides:
GetName in class Protocol
 o SetProperties
 public boolean SetProperties(Properties props)
Setup the Protocol instance acording to the configuration string

Overrides:
SetProperties in class Protocol
 o Reset
 public void Reset()
Just remove if you don't need to reset any state

Overrides:
Reset in class Protocol
 o Up
 public void Up(Event evt)
Remove the MnakHeader. The message might be a ucast message, in which case we just pass it up, or an mcast message. In the latter case, it could be a normal message, or a retransmit request. In the first case, we stick it into a sliding window table (one per sender) and try to remove as many message as possible from it (until 'null' is returned). The sliding window table will call us when it requires a missing message (to fill a gap); we then have to send a retransmit request. Whenever a message is removed from the sliding window table, we keep it in case someone asks us to retransmit it later on (we still have to write a STABLE layer that discards 'old' messages). In the second case (retransmit request), we lookup the message either among the ones we sent ourself, or in the messages we received. If found, we just send it.

Overrides:
Up in class Protocol
 o Down
 public void Down(Event evt)
Tag every message that is a multicast message (dest is null) with an MnakHeader, containing a sequence number.

Overrides:
Down in class Protocol

All Packages  Class Hierarchy  This Package  Previous  Next  Index