All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----JavaGroups.AckReceiverWindow
window_size
size (should currently be the same as in the
AckSenderWindow counterpart (we don't yet have dynamically adjusting window sizes). Any message
is added in order, duplicate messages are discarded. Every message received is ACK'ed (even
duplicates). When the window is full, only a message that would remove a message from the window
is accepted (that is, one whose seq_no is equal to the next_to_remove
), all
others are discarded.
Messages are removed in order; the first message has to have its seq_no equal to
next_to_remove
(which will be incremented when a message is removed).
next_to_remove
, increments the latter.
public AckReceiverWindow(long initial_seq_no)AckReceiverWindow
public AckReceiverWindow(int window_size, long initial_seq_no)
public void Add(long seq_no, Message msg)Remove
public Message Remove()
next_to_remove
, increments the latter.
Returns message that was removed, or null, if no message can be removed. Messages are thus
removed in order.
public String toString()
public static void main(String args[])
All Packages Class Hierarchy This Package Previous Next Index