Package org.jgroups.protocols
Class SimplifiedTransferQueueBundler
java.lang.Object
org.jgroups.protocols.BaseBundler
org.jgroups.protocols.TransferQueueBundler
org.jgroups.protocols.SimplifiedTransferQueueBundler
This bundler uses the same logic as
TransferQueueBundler but does not allocate
memory except for the buffer itself and does not use complex data structures.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected static final intprotected final Message[]Fields 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) protected voidSends all messages in the map.intsize()Returns the total number of messages in the hashmapMethods inherited from class org.jgroups.protocols.TransferQueueBundler
addAndSendIfSizeExceeded, drain, dropWhenFull, dropWhenFull, getQueueSize, init, removeQueueSize, renameThread, resetStats, run, send, start, stopMethods inherited from class org.jgroups.protocols.BaseBundler
getCapacity, getMaxSize, sendMessageList, sendSingleMessage, setCapacity, setMaxSize, viewChange
-
Field Details
-
MSG_BUF_SIZE
protected static final int MSG_BUF_SIZE- See Also:
-
msg_queue
-
curr
protected int curr
-
-
Constructor Details
-
SimplifiedTransferQueueBundler
public SimplifiedTransferQueueBundler()
-
-
Method Details
-
size
public int size()Description copied from class:BaseBundlerReturns the total number of messages in the hashmap- Specified by:
sizein interfaceBundler- Overrides:
sizein classTransferQueueBundler
-
addMessage
- Overrides:
addMessagein classBaseBundler
-
sendBundledMessages
protected void sendBundledMessages()Description copied from class:BaseBundlerSends all messages in the map. Messages for the same destination are bundled into a message list. The map will be cleared when done.- Overrides:
sendBundledMessagesin classBaseBundler
-
_sendBundledMessages
protected void _sendBundledMessages()
-