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
-
MNAK()
-
-
Down(Event)
- Tag every message that is a multicast message (dest is null) with an MnakHeader, containing
a sequence number.
-
GetName()
-
-
Reset()
- Just remove if you don't need to reset any state
-
Retransmit(long, Object, boolean, boolean)
-
Method called by sliding window when it need to 'fill' a gap between sequence numbers.
-
SetProperties(Properties)
- Setup the Protocol instance acording to the configuration string
-
Up(Event)
- Remove the MnakHeader.
MNAK
public MNAK()
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 !
GetName
public String GetName()
- Overrides:
- GetName in class Protocol
SetProperties
public boolean SetProperties(Properties props)
- Setup the Protocol instance acording to the configuration string
- Overrides:
- SetProperties in class Protocol
Reset
public void Reset()
- Just remove if you don't need to reset any state
- Overrides:
- Reset in class Protocol
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
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