Package org.jgroups.protocols
Class NAKACK3
- java.lang.Object
-
- org.jgroups.stack.Protocol
-
- org.jgroups.protocols.ReliableMulticast
-
- org.jgroups.protocols.NAKACK3
-
- All Implemented Interfaces:
Lifecycle
,DiagnosticsHandler.ProbeHandler
public class NAKACK3 extends ReliableMulticast
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.
Retransmit requests are usually sent to the original sender of a message, but this can be changed by xmit_from_random_member (send to random member) or use_mcast_xmit_req (send to everyone). Responses can also be sent to everyone instead of the requester by setting use_mcast_xmit to true.- Since:
- 5.4
- Author:
- Bela Ban
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.jgroups.protocols.ReliableMulticast
ReliableMulticast.LastSeqnoResender, ReliableMulticast.RetransmitTask
-
-
Field Summary
Fields Modifier and Type Field Description protected long
xmit_table_max_compaction_time
protected int
xmit_table_msgs_per_row
protected int
xmit_table_num_rows
protected double
xmit_table_resize_factor
-
Fields inherited from class org.jgroups.protocols.ReliableMulticast
avg_batch_size, BATCH_ACCUMULATOR, batches, become_server_queue, become_server_queue_size, digest_history, discard_delivered_msgs, DUMMY_OOB_MSG, HAS_HEADER, is_server, is_trace, last_seqno_resender, leaving, local_xmit_table, log_discard_msgs, log_not_found_msgs, max_batch_size, max_xmit_req_size, members, no_dummy_and_no_oob_delivered_msgs_and_no_dont_loopback_msgs, num_messages_received, num_messages_sent, remove_filter, reuse_message_batches, running, sends_can_block, seqno, SEQNO_GETTER, stability_msgs, stable_xmit_map, suppress_log_non_member, suppress_time_non_member_warnings, timer, use_mcast_xmit, use_mcast_xmit_req, view, xmit_from_random_member, xmit_interval, xmit_reqs_received, xmit_reqs_sent, xmit_rsps_received, xmit_rsps_sent, xmit_table, xmit_task, xmit_task_map
-
Fields inherited from class org.jgroups.stack.Protocol
after_creation_hook, down_prot, ergonomics, id, local_addr, log, policies, stack, stats, up_prot
-
-
Constructor Summary
Constructors Constructor Description NAKACK3()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
compact()
protected Buffer<Message>
createXmitWindow(long initial_seqno)
java.lang.String
dumpXmitTablesNumCurrentRows()
long
getXmitTableMaxCompactionTime()
int
getXmitTableMsgsPerRow()
int
getXmitTableNumCompactions()
int
getXmitTableNumCurrentRows()
int
getXmitTableNumMoves()
int
getXmitTableNumPurges()
int
getXmitTableNumResizes()
int
getXmitTableNumRows()
double
getXmitTableResizeFactor()
void
init()
Called after a protocol has been created and before the protocol is started.ReliableMulticast
setXmitTableMaxCompactionTime(long x)
ReliableMulticast
setXmitTableMsgsPerRow(int x)
ReliableMulticast
setXmitTableNumRows(int x)
ReliableMulticast
setXmitTableResizeFactor(double x)
-
Methods inherited from class org.jgroups.protocols.ReliableMulticast
adjustReceivers, clearNonMemberCache, deliver, deliverBatch, discardDeliveredMsgs, discardDeliveredMsgs, down, down, flushBecomeServerQueue, getBecomeServerQueueSize, getBecomeServerQueueSizeActual, getCurrentSeqno, getDigest, getDigest, getMaxXmitReqSize, getNonMemberMessages, getNumMessagesReceived, getNumMessagesSent, getSizeOfAllMessages, getSizeOfAllMessagesInclHeaders, getSuppressTimeNonMemberWarnings, getWindow, getXmitInterval, getXmitRequestsReceived, getXmitRequestsSent, getXmitResponsesReceived, getXmitResponsesSent, getXmitTableCapacity, getXmitTableMissingMessages, getXmitTableUndeliveredMsgs, handleAck, handleHighestSeqno, handleMessage, handleMessageBatch, handleProbe, handleXmitReq, handleXmitRsp, isCallerRunsHandler, isTrace, isTrace, isXmitTaskRunning, logDiscardMessages, logDiscardMessages, logNotFoundMessages, logNotFoundMessages, mergeDigest, msgFromXmitRsp, overwriteDigest, printBatches, printDigestHistory, printMessages, printStabilityMessages, providedUpServices, queueMessage, removeAndDeliver, resend, reset, resetStats, retransmit, retransmit, reuseMessageBatches, reuseMessageBatches, send, sendAck, sendBuf, sendOptions, sendsCanBlock, sendsCanBlock, sendXmitRsp, setBecomeServerQueueSize, setDigest, setDigest, setDiscardDeliveredMsgs, setLevel, setMaxXmitReqSize, setNumMessagesReceived, setNumMessagesSent, setSuppressTimeNonMemberWarnings, setTimer, setXmitFromRandomMember, setXmitInterval, sizeOfAllMessages, stable, start, startRetransmitTask, stop, stopRetransmitTask, supportedKeys, triggerXmit, unknownMember, up, up, up, useMcastXmit, useMcastXmit, useMcastXmitReq, useMcastXmitReq, xmitFromRandomMember, xmitFromRandomMember
-
Methods inherited from class org.jgroups.stack.Protocol
accept, addPolicy, addr, addr, afterCreationHook, destroy, down, enableStats, getAddress, getComponents, getDownProtocol, getDownServices, getId, getIdsAbove, getLevel, getLog, getName, getPolicies, getProtocolStack, getSocketFactory, getThreadFactory, getTransport, getUpProtocol, getUpServices, getValue, isErgonomics, level, parse, policies, providedDownServices, removePolicy, requiredDownServices, requiredUpServices, resetStatistics, setAddress, setDownProtocol, setErgonomics, setId, setPolicies, setProtocolStack, setSocketFactory, setUpProtocol, setValue, statsEnabled, toString
-
-
-
-
Method Detail
-
getXmitTableNumRows
public int getXmitTableNumRows()
-
setXmitTableNumRows
public ReliableMulticast setXmitTableNumRows(int x)
-
getXmitTableMsgsPerRow
public int getXmitTableMsgsPerRow()
-
setXmitTableMsgsPerRow
public ReliableMulticast setXmitTableMsgsPerRow(int x)
-
getXmitTableResizeFactor
public double getXmitTableResizeFactor()
-
setXmitTableResizeFactor
public ReliableMulticast setXmitTableResizeFactor(double x)
-
getXmitTableMaxCompactionTime
public long getXmitTableMaxCompactionTime()
-
setXmitTableMaxCompactionTime
public ReliableMulticast setXmitTableMaxCompactionTime(long x)
-
createXmitWindow
protected Buffer<Message> createXmitWindow(long initial_seqno)
- Specified by:
createXmitWindow
in classReliableMulticast
-
getXmitTableNumCurrentRows
public int getXmitTableNumCurrentRows()
-
getXmitTableNumCompactions
public int getXmitTableNumCompactions()
-
getXmitTableNumMoves
public int getXmitTableNumMoves()
-
getXmitTableNumResizes
public int getXmitTableNumResizes()
-
getXmitTableNumPurges
public int getXmitTableNumPurges()
-
compact
public void compact()
-
dumpXmitTablesNumCurrentRows
public java.lang.String dumpXmitTablesNumCurrentRows()
-
init
public void init() throws java.lang.Exception
Description copied from class:Protocol
Called after a protocol has been created and before the protocol is started. Attributes are already set. Other protocols are not yet connected and events cannot yet be sent.- Specified by:
init
in interfaceLifecycle
- Overrides:
init
in classReliableMulticast
- Throws:
java.lang.Exception
- Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the the channel constructor will throw an exception
-
-