Package org.jgroups.protocols
Class AlternatingBundler
java.lang.Object
org.jgroups.protocols.BaseBundler
org.jgroups.protocols.TransferQueueBundler
org.jgroups.protocols.AlternatingBundler
Bundler implementation which sends message batches (or single messages) as soon as the target destination changes
(or max_bundler_size would be exceeded).
Messages are removed from the main queue one by one and processed as follows:
A B B C C A causes the following sends: A -> {CC} -> {BB} -> A
Note that null is also a valid destination (send-to-all).
JIRA: https://issues.redhat.com/browse/JGRP-2171
- Since:
- 4.0.4
-
Field Summary
FieldsFields inherited from class org.jgroups.protocols.TransferQueueBundler
avg_fill_count, bundler_thread, drop_when_full, num_drops_on_full_queue, num_sends_because_full_queue, num_sends_because_no_msgs, queue, remove_queue, running, THREAD_NAMEFields inherited from class org.jgroups.protocols.BaseBundler
avg_send_time, capacity, count, lock, log, max_size, msgs, output, transport -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidaddMessage(Message msg, int size) voidvoidrun()Methods inherited from class org.jgroups.protocols.TransferQueueBundler
addAndSendIfSizeExceeded, drain, dropWhenFull, dropWhenFull, getQueueSize, init, removeQueueSize, renameThread, send, size, start, stopMethods inherited from class org.jgroups.protocols.BaseBundler
getCapacity, getMaxSize, sendBundledMessages, sendMessageList, sendSingleMessage, setCapacity, setMaxSize, viewChange
-
Field Details
-
target_dest
-
target_list
-
avg_batch_size
-
-
Constructor Details
-
AlternatingBundler
public AlternatingBundler()
-
-
Method Details
-
getAverageBatchSize
-
resetStats
public void resetStats()- Specified by:
resetStatsin interfaceBundler- Overrides:
resetStatsin classTransferQueueBundler
-
run
public void run()- Specified by:
runin interfaceRunnable- Overrides:
runin classTransferQueueBundler
-
_sendBundledMessages
protected void _sendBundledMessages() -
addMessage
- Overrides:
addMessagein classBaseBundler
-