| java.lang.Object java.lang.Thread org.jgroups.stack.UpHandler org.jgroups.protocols.pbcast.NAKACK
NAKACK | public class NAKACK extends Protocol implements Retransmitter.RetransmitCommand,NakReceiverWindow.Listener(Code) | | Negative AcKnowledgement layer (NAKs). Messages are assigned a monotonically increasing sequence number (seqno).
Receivers deliver messages ordered according to seqno and request retransmission of missing messages. Retransmitted
messages are bundled into bigger ones, e.g. when getting an xmit request for messages 1-10, instead of sending 10
unicast messages, we bundle all 10 messages into 1 and send it. However, since this protocol typically sits below
FRAG, we cannot count on FRAG to fragement/defragment the (possibly) large message into smaller ones. Therefore we
only bundle messages up to max_xmit_size bytes to prevent too large messages. For example, if the bundled message
size was a total of 34000 bytes, and max_xmit_size=16000, we'd send 3 messages: 2 16K and a 2K message. Note that
max_xmit_size should be the same value as FRAG.frag_size (or smaller). Retransmit requests are always sent
to the sender. If the sender dies, and not everyone has received its messages, they will be lost. In the future, this
may be changed to have receivers store all messages, so that retransmit requests can be answered by any member.
Trivial to implement, but not done yet. For most apps, the default retransmit properties are sufficient, if not use
vsync.
author: Bela Ban |
Inner Class :static class Entry | |
Inner Class :static class XmitRequest | |
Inner Class :static class MissingMessage | |
Constructor Summary | |
public | NAKACK() |
down | public void down(Event evt)(Code) | | Callback. Called by superclass when event may be handled. Do not use passDown() in this
method as the event is passed down by default by the superclass after this method returns !
|
getGcLag | public int getGcLag()(Code) | | |
getMaxXmitBufSize | public int getMaxXmitBufSize()(Code) | | |
getMaxXmitSize | public long getMaxXmitSize()(Code) | | |
getMissingMessagesReceived | public long getMissingMessagesReceived()(Code) | | |
getPendingRetransmissionRequests | public int getPendingRetransmissionRequests()(Code) | | |
getReceivedTableSize | public int getReceivedTableSize()(Code) | | |
getSentTableSize | public int getSentTableSize()(Code) | | |
getXmitRequestsReceived | public long getXmitRequestsReceived()(Code) | | |
getXmitRequestsSent | public long getXmitRequestsSent()(Code) | | |
getXmitResponsesReceived | public long getXmitResponsesReceived()(Code) | | |
getXmitResponsesSent | public long getXmitResponsesSent()(Code) | | |
isDiscardDeliveredMsgs | public boolean isDiscardDeliveredMsgs()(Code) | | |
isUseMcastXmit | public boolean isUseMcastXmit()(Code) | | |
isXmitFromRandomMember | public boolean isXmitFromRandomMember()(Code) | | |
missingMessageReceived | public void missingMessageReceived(long seqno, Message msg)(Code) | | |
providedDownServices | public Vector providedDownServices()(Code) | | |
resetStats | public void resetStats()(Code) | | |
retransmit | public void retransmit(long first_seqno, long last_seqno, Address sender)(Code) | | Implementation of Retransmitter.RetransmitCommand. Called by retransmission thread when gap is detected.
|
setDiscardDeliveredMsgs | public void setDiscardDeliveredMsgs(boolean discard_delivered_msgs)(Code) | | |
setGcLag | public void setGcLag(int gc_lag)(Code) | | |
setMaxXmitBufSize | public void setMaxXmitBufSize(int max_xmit_buf_size)(Code) | | |
setMaxXmitSize | public void setMaxXmitSize(long max_xmit_size)(Code) | | |
setUseMcastXmit | public void setUseMcastXmit(boolean use_mcast_xmit)(Code) | | |
setXmitFromRandomMember | public void setXmitFromRandomMember(boolean xmit_from_random_member)(Code) | | |
up | public void up(Event evt)(Code) | | Callback. Called by superclass when event may be handled. Do not use PassUp in this
method as the event is passed up by default by the superclass after this method returns !
|
Fields inherited from org.jgroups.stack.UpHandler | final protected Log log(Code)(Java Doc)
|
|
|