Package org.jgroups.protocols
Class NoBundler
- java.lang.Object
-
- org.jgroups.protocols.BaseBundler
-
- org.jgroups.protocols.NoBundler
-
- All Implemented Interfaces:
Bundler
public class NoBundler extends BaseBundler
Bundler which doesn't bundle :-) Can be used to measure the diff between bundling and non-bundling (e.g. at runtime). Not really meant for production.- Since:
- 4.0
- Author:
- Bela Ban
-
-
Field Summary
-
Fields inherited from class org.jgroups.protocols.BaseBundler
avg_send_time, capacity, count, FUNC, lock, log, max_size, msg_processing_policy, msg_stats, msgs, output, transport
-
-
Constructor Summary
Constructors Constructor Description NoBundler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getQueueSize()
If the bundler has a queue and it should be managed by a queuing discipline (like Random Early Detection), then return the number of elements in the queue, else -1.void
send(Message msg)
int
size()
Returns the total number of messages in the hashmap-
Methods inherited from class org.jgroups.protocols.BaseBundler
addMessage, getCapacity, getMaxSize, init, loopback, loopback, loopbackUnlessDontLoopbackIsSet, printBuffers, resetStats, sendBundledMessages, sendMessageList, sendMessageList, sendMultiple, sendMultiple, sendSingle, sendSingleMessage, setCapacity, setMaxSize, start, stop, viewChange
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.jgroups.protocols.Bundler
renameThread
-
-
-
-
Method Detail
-
size
public int size()
Description copied from class:BaseBundler
Returns the total number of messages in the hashmap- Specified by:
size
in interfaceBundler
- Overrides:
size
in classBaseBundler
-
getQueueSize
public int getQueueSize()
Description copied from interface:Bundler
If the bundler has a queue and it should be managed by a queuing discipline (like Random Early Detection), then return the number of elements in the queue, else -1. In the latter case, the queue won't be managed.
This method needs to be fast as it might get called on every message to be sent.- Specified by:
getQueueSize
in interfaceBundler
- Overrides:
getQueueSize
in classBaseBundler
-
send
public void send(Message msg) throws java.lang.Exception
- Specified by:
send
in interfaceBundler
- Overrides:
send
in classBaseBundler
- Throws:
java.lang.Exception
-
-