Class UNICAST4
java.lang.Object
org.jgroups.stack.Protocol
org.jgroups.protocols.ReliableUnicast
org.jgroups.protocols.UNICAST4
- All Implemented Interfaces:
Lifecycle, AgeOutCache.Handler<Address>
New unicast protocol based on fixed-size xmit windows and message ACKs
Details: https://issues.redhat.com/browse/JGRP-2843
Details: https://issues.redhat.com/browse/JGRP-2843
- Since:
- 5.4
- Author:
- Bela Ban
-
Nested Class Summary
Nested classes/interfaces inherited from class ReliableUnicast
ReliableUnicast.Entry, ReliableUnicast.ReceiverEntry, ReliableUnicast.RetransmitTask, ReliableUnicast.SenderEntry, ReliableUnicast.State -
Field Summary
FieldsFields inherited from class ReliableUnicast
avg_delivery_batch_size, BATCH_ACCUMULATOR, cache, cached_batches, conn_close_timeout, conn_expiry_timeout, DEFAULT_FIRST_SEQNO, DEFAULT_INCREMENT, DEFAULT_INITIAL_CAPACITY, DEFAULT_XMIT_INTERVAL, drop_oob_and_dont_loopback_msgs_filter, DUMMY_OOB_MSG, is_trace, last_conn_id, last_sync_sent, log_not_found_msgs, loopback, max_batch_size, max_retransmit_time, max_xmit_req_size, members, msg_cache, num_acks_received, num_acks_sent, num_loopbacks, num_msgs_received, num_msgs_sent, num_xmits, recv_table, recv_table_lock, relay_present, remove_filter, reuse_message_batches, running, send_atomically, send_table, sends_can_block, sync_min_interval, time_service, timer, timestamper, xmit_interval, xmit_reqs_received, xmit_reqs_sent, xmit_rsps_sent, xmit_task, xmit_task_map, xmits_enabledFields inherited from class Protocol
after_creation_hook, down_prot, ergonomics, id, local_addr, log, policies, preview_warning, stack, stats, up_prot -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintackThreshold(int t) intcapacity()capacity(int c) voidchangeCapacity(int new_capacity) Changes the capacity of all buffers, basically by creating new buffers and copying the messages from the old ones.createBuffer(long s) longvoidinit()Called after a protocol has been created and before the protocol is started.protected booleanneedToSendAck(ReliableUnicast.Entry e, int num_acks) Methods inherited from class ReliableUnicast
_getReceiverEntry, _getSenderEntry, accumulate, addMessage, addQueuedMessages, addToSendBuffer, clearCachedBatches, closeConnection, closeIdleConnections, closeReceiveConnection, closeSendConnection, compare, compareConnIds, createReceiverEntry, deliverBatch, deliverMessage, down, down, expired, getAgeOutCache, getAgeOutCacheSize, getConnCloseTimeout, getConnExpiryTimeout, getLowestSeqno, getMaxRetransmitTime, getMaxXmitReqSize, getNewConnectionId, getNumAcksReceived, getNumAcksSent, getNumConnections, getNumLoopbacks, getNumReceiveConnections, getNumSendConnections, getNumUnackedMessages, getNumUnackedMessages, getNumXmits, getReceiverEntry, getSenderEntry, getSyncMinInterval, getTimestamp, getTimestamper, getXmitInterval, getXmitTableDeliverableMessages, getXmitTableMissingMessages, getXmitTableUndeliveredMessages, handleAckReceived, handleBatchFromSelf, handleBatchReceived, handleDataReceived, handleDataReceivedFromSelf, handleResendingOfFirstMessage, handleUpEvent, handleXmitRequest, hasSendConnectionTo, isLocal, isLocalSiteMaster, isXmitsEnabled, isXmitTaskRunning, lastSync, logNotFoundMsgs, logNotFoundMsgs, loopback, loopback, max, printAgeOutCache, printCachedBatches, printConnections, printMessageList, printReceiveWindowMessages, printSendWindowMessages, removeAllConnections, removeAndDeliver, removeConnections, removeExpiredConnections, removeReceiveConnection, removeSendConnection, resend, resetStats, retransmit, retransmit, reuseMessageBatches, reuseMessageBatches, send, sendAck, sendAtomically, sendAtomically, sendClose, sendPendingAcks, sendRequestForFirstSeqno, sendsCanBlock, sendsCanBlock, setConnCloseTimeout, setConnExpiryTimeout, setLevel, setMaxRetransmitTime, setMaxXmitReqSize, setSyncMinInterval, setXmitInterval, setXmitsEnabled, start, startRetransmitTask, stop, stopRetransmitTask, timeService, triggerXmit, trimCachedBatches, up, up, updateMethods inherited from class 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, previewWarning, previewWarning, providedDownServices, providedUpServices, removePolicy, requiredDownServices, requiredUpServices, resetStatistics, setAddress, setDownProtocol, setErgonomics, setId, setPolicies, setProtocolStack, setSocketFactory, setUpProtocol, setValue, statsEnabled, toString, up
-
Field Details
-
capacity
protected int capacity -
ack_threshold
protected int ack_threshold -
add_acks
-
-
Constructor Details
-
UNICAST4
public UNICAST4()
-
-
Method Details
-
getNumBlockings
public long getNumBlockings() -
getAvgTimeBlocked
-
changeCapacity
public void changeCapacity(int new_capacity) Changes the capacity of all buffers, basically by creating new buffers and copying the messages from the old ones. This method is only supposed to be used by perf testing, so DON'T USE! -
createBuffer
- Specified by:
createBufferin classReliableUnicast
-
capacity
public int capacity() -
capacity
-
ackThreshold
public int ackThreshold() -
ackThreshold
-
init
Description copied from class:ProtocolCalled 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:
initin interfaceLifecycle- Overrides:
initin classReliableUnicast- Throws:
Exception- Thrown if protocol cannot be initialized successfully. This will cause the ProtocolStack to fail, so the the channel constructor will throw an exception
-
needToSendAck
- Specified by:
needToSendAckin classReliableUnicast
-