| java.lang.Object org.jgroups.stack.AckSenderWindow
All known Subclasses: org.jgroups.protocols.UNICAST,
AckSenderWindow | public class AckSenderWindow implements Retransmitter.RetransmitCommand(Code) | | ACK-based sliding window for a sender. Messages are added to the window keyed by seqno
When an ACK is received, the corresponding message is removed. The Retransmitter
continously iterates over the entries in the hashmap, retransmitting messages based on their
creation time and an (increasing) timeout. When there are no more messages in the retransmission
table left, the thread terminates. It will be re-activated when a new entry is added to the
retransmission table.
author: Bela Ban |
Inner Class :public interface RetransmitCommand | |
Inner Class :static class Entry | |
Inner Class :static class Dummy implements RetransmitCommand | |
interval | long[] interval(Code) | | |
retransmit_command | RetransmitCommand retransmit_command(Code) | | |
AckSenderWindow | public AckSenderWindow(RetransmitCommand com)(Code) | | Creates a new instance. Thre retransmission thread has to be started separately with
start() .
Parameters: com - If not null, its method retransmit() will be called when a messageneeds to be retransmitted (called by the Retransmitter). |
AckSenderWindow | public AckSenderWindow(RetransmitCommand com, long[] interval)(Code) | | |
AckSenderWindow | public AckSenderWindow(RetransmitCommand com, long[] interval, TimeScheduler sched)(Code) | | |
ack | public void ack(long seqno)(Code) | | Removes the message from msgs , removing them also from retransmission. If
sliding window protocol is used, and was queueing, check whether we can resume adding elements.
Add all elements. If this goes above window_size, stop adding and back to queueing. Else
set queueing to false.
|
add | public void add(long seqno, Message msg)(Code) | | Adds a new message to the retransmission table. If the message won't have received an ack within
a certain time frame, the retransmission thread will retransmit the message to the receiver. If
a sliding window protocol is used, we only add up to window_size messages. If the table is
full, we add all new messages to a queue. Those will only be added once the table drains below a certain
threshold (min_threshold )
|
reset | public void reset()(Code) | | |
retransmit | public void retransmit(long first_seqno, long last_seqno, Address sender)(Code) | | |
|
|