to the hashtable (peer address is the key). All
messages sent to that peer will be added to hashtable.peer_addr.sent_msgs. When we receive a
message from a peer for the first time, another entry will be created and added to the hashtable
(unless already existing). Msgs will then be added to hashtable.peer_addr.received_msgs. This
layer is used to reliably transmit point-to-point messages, that is, either messages sent to a
single receiver (vs. messages multicast to a group) or for example replies to a multicast message. The
sender uses an AckSenderWindow
which retransmits messages for which it hasn't received
an ACK, the receiver uses AckReceiverWindow
which keeps track of the lowest seqno
received so far, and keeps messages in order.
Messages in both AckSenderWindows and AckReceiverWindows will be removed. A message will be removed from
AckSenderWindow when an ACK has been received for it and messages will be removed from AckReceiverWindow
whenever a message is received: the new message is added and then we try to remove as many messages as
possible (until we stop at a gap, or there are no more messages).
- Author:
- Bela Ban
Fields inherited from class org.jgroups.stack.Protocol |
down_prot, log, props, stack, stats, up_prot |
Methods inherited from class org.jgroups.stack.Protocol |
destroy, downThreadEnabled, enableStats, getDownProtocol, getProperties, getUpProtocol, init, printStats, providedDownServices, providedUpServices, requiredDownServices, requiredUpServices, setDownProtocol, setPropertiesInternal, setProtocolStack, setUpProtocol, statsEnabled, upThreadEnabled |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JOLSR_UNICAST
public JOLSR_UNICAST()
down
public java.lang.Object down(org.jgroups.Event evt)
- Overrides:
down
in class org.jgroups.stack.Protocol
dumpStats
public java.util.Map<java.lang.String,java.lang.Object> dumpStats()
- Overrides:
dumpStats
in class org.jgroups.stack.Protocol
getLocalAddress
public java.lang.String getLocalAddress()
getMembers
public java.lang.String getMembers()
getName
public java.lang.String getName()
- All protocol names have to be unique !
- Specified by:
getName
in class org.jgroups.stack.Protocol
getNumAcksReceived
public long getNumAcksReceived()
getNumAcksSent
public long getNumAcksSent()
getNumberOfMessagesInReceiveWindows
public int getNumberOfMessagesInReceiveWindows()
getNumberOfRetransmitRequestsReceived
public long getNumberOfRetransmitRequestsReceived()
getNumberOfUnackedMessages
public int getNumberOfUnackedMessages()
- The number of messages in all Entry.sent_msgs tables (haven't received an ACK yet)
getNumBytesReceived
public long getNumBytesReceived()
getNumBytesSent
public long getNumBytesSent()
getNumMessagesReceived
public long getNumMessagesReceived()
getNumMessagesSent
public long getNumMessagesSent()
getUnackedMessages
public java.lang.String getUnackedMessages()
printConnections
public java.lang.String printConnections()
resetStats
public void resetStats()
- Overrides:
resetStats
in class org.jgroups.stack.Protocol
retransmit
public void retransmit(long seqno,
org.jgroups.Message msg)
- Called by AckSenderWindow to resend messages for which no ACK has been received yet
- Specified by:
retransmit
in interface org.jgroups.stack.AckSenderWindow.RetransmitCommand
setProperties
public boolean setProperties(java.util.Properties props)
- Overrides:
setProperties
in class org.jgroups.stack.Protocol
start
public void start()
throws java.lang.Exception
- Overrides:
start
in class org.jgroups.stack.Protocol
- Throws:
java.lang.Exception
stop
public void stop()
- Overrides:
stop
in class org.jgroups.stack.Protocol
up
public java.lang.Object up(org.jgroups.Event evt)
- Overrides:
up
in class org.jgroups.stack.Protocol