Package org.jgroups.protocols
Class SimplifiedTransferQueueBundler
- java.lang.Object
-
- org.jgroups.protocols.BaseBundler
-
- org.jgroups.protocols.TransferQueueBundler
-
- org.jgroups.protocols.SimplifiedTransferQueueBundler
-
- All Implemented Interfaces:
java.lang.Runnable,Bundler
public class SimplifiedTransferQueueBundler extends TransferQueueBundler
This bundler uses the same logic asTransferQueueBundlerbut does not allocate memory except for the buffer itself and does not use complex data structures.- Author:
- Radim Vansa
-
-
Field Summary
Fields Modifier and Type Field Description protected intcurrprotected static intMSG_BUF_SIZEprotected Message[]msg_queue-
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_NAME
-
Fields inherited from class org.jgroups.protocols.BaseBundler
avg_send_time, capacity, count, lock, log, max_size, msgs, output, transport
-
-
Constructor Summary
Constructors Constructor Description SimplifiedTransferQueueBundler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void_sendBundledMessages()protected voidaddMessage(Message msg, int size)protected voidsendBundledMessages()Sends all messages in the map.intsize()Returns the total number of messages in the hashmap-
Methods inherited from class org.jgroups.protocols.TransferQueueBundler
addAndSendIfSizeExceeded, drain, dropWhenFull, dropWhenFull, getQueueSize, init, removeQueueSize, renameThread, resetStats, run, send, start, stop
-
Methods inherited from class org.jgroups.protocols.BaseBundler
getCapacity, getMaxSize, sendMessageList, sendSingleMessage, setCapacity, setMaxSize, viewChange
-
-
-
-
Field Detail
-
MSG_BUF_SIZE
protected static final int MSG_BUF_SIZE
- See Also:
- Constant Field Values
-
msg_queue
protected final Message[] msg_queue
-
curr
protected int curr
-
-
Method Detail
-
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
protected void addMessage(Message msg, int size)
- 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()
-
-