|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jgroups.stack.AckSenderWindow
public class AckSenderWindow
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.
Nested Class Summary | |
---|---|
static interface |
AckSenderWindow.RetransmitCommand
|
Constructor Summary | |
---|---|
AckSenderWindow(AckSenderWindow.RetransmitCommand com)
Creates a new instance. |
|
AckSenderWindow(AckSenderWindow.RetransmitCommand com,
Interval interval)
|
|
AckSenderWindow(AckSenderWindow.RetransmitCommand com,
Interval interval,
TimeScheduler sched)
|
|
AckSenderWindow(AckSenderWindow.RetransmitCommand com,
Interval interval,
TimeScheduler sched,
Address sender)
|
Method Summary | |
---|---|
void |
ack(long seqno)
Removes all messages less than or equal to seqno from msgs , and cancels their retransmission. |
void |
add(long seqno,
Message msg)
Adds a new message to the retransmission table. |
Message |
getLowestMessage()
Returns the message with the lowest seqno |
java.lang.Long |
getLowestSeqno()
|
static void |
main(java.lang.String[] args)
|
java.lang.String |
printDetails()
|
void |
reset()
|
void |
retransmit(long first_seqno,
long last_seqno,
Address sender)
Get the missing messages between sequence numbers first_seqno and last_seqno . |
int |
size()
|
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AckSenderWindow(AckSenderWindow.RetransmitCommand com)
start()
.
com
- If not null, its method retransmit()
will be called when a message
needs to be retransmitted (called by the Retransmitter).public AckSenderWindow(AckSenderWindow.RetransmitCommand com, Interval interval)
public AckSenderWindow(AckSenderWindow.RetransmitCommand com, Interval interval, TimeScheduler sched)
public AckSenderWindow(AckSenderWindow.RetransmitCommand com, Interval interval, TimeScheduler sched, Address sender)
Method Detail |
---|
public void reset()
public void add(long seqno, Message msg)
public void ack(long seqno)
msgs
, and cancels their retransmission.
public Message getLowestMessage()
public int size()
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String printDetails()
public void retransmit(long first_seqno, long last_seqno, Address sender)
Retransmitter.RetransmitCommand
first_seqno
and last_seqno
. This can either be done by sending a
retransmit message to destination sender
(nak-based scheme), or by
retransmitting the missing message(s) to sender
(ack-based scheme).
retransmit
in interface Retransmitter.RetransmitCommand
first_seqno
- The sequence number of the first missing messagelast_seqno
- The sequence number of the last missing messagesender
- The destination of the member to which the retransmit request will be sent
(nak-based scheme), or to which the message will be retransmitted (ack-based scheme).public java.lang.Long getLowestSeqno()
public static void main(java.lang.String[] args)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |