org.jgroups.protocols
public class NAKACK extends Protocol
Once a mode is set, it remains in effect until exactly 1 message has been sent, afterwards the default mode NAK is used again.
The following communication between 2 peers exists (left side is initiator, right side receiver):send_out_of_band --------------> synchronous (1) <------------- ack send_nak --------------> asynchronous (2) send_nak_ack --------------> synchronous (3) <-------------- ack retransmit <-------------- asynchronous (4)When a message is sent, it will contain a header describing the type of the message, and containing additional data, such as sequence number etc. When a message is received, it is fed into either the OutOfBander or NAKer, depending on the header's type.
Note that in the synchronous modes, ACKs are sent for each request. If a reliable unicast protocol layer exists somewhere underneath this layer, then even the ACKs are transmitted reliably, thus increasing the number of messages exchanged. However, since it is envisaged that ACK/OUT_OF_BAND are not used frequently, this problem is currently not addressed.
Method Summary | |
---|---|
void | down(Event evt)
Callback. |
String | getName() |
void | init()
Do some initial tasks |
Vector | providedDownServices() |
Vector | providedUpServices() |
boolean | setProperties(Properties props) todo Maybe messages from previous vids are stored while client |
void | stop() |
void | up(Event evt)
Callback. |
Do not use passDown
in this method as the event is passed down
by default by the superclass after this method returns !
Do not use passUp()
in this method as the event is passed up
by default by the superclass after this method returns !