Package org.jgroups.protocols
Class NoBundler
java.lang.Object
org.jgroups.protocols.NoBundler
- All Implemented Interfaces:
Bundler
- Direct Known Subclasses:
AsyncNoBundler,BatchBundler
Bundler which doesn't bundle :-) Can be used to measure the diff between bundling and non-bundling (e.g. at runtime)
This bundler doesn't use a pool of buffers, but creates a new buffer every time a message is sent.
- Since:
- 4.0
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintMaximum number of bytes for messages to be queued until they are sentintIf 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.voidCalled after creation of the bundlervoidprotected voidsendSingleMessage(Message msg, ByteArrayDataOutputStream output) intsize()The number of unsent messages in the bundlervoidstart()Called afterBundler.init(TP)voidstop()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jgroups.protocols.Bundler
getCapacity, renameThread, resetStats, setMaxSize, viewChange
-
Field Details
-
transport
-
log
-
-
Constructor Details
-
NoBundler
public NoBundler()
-
-
Method Details
-
size
public int size()Description copied from interface:BundlerThe number of unsent messages in the bundler -
getMaxSize
public int getMaxSize()Description copied from interface:BundlerMaximum number of bytes for messages to be queued until they are sent- Specified by:
getMaxSizein interfaceBundler
-
init
Description copied from interface:BundlerCalled after creation of the bundler -
getQueueSize
public int getQueueSize()Description copied from interface:BundlerIf 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:
getQueueSizein interfaceBundler
-
start
public void start()Description copied from interface:BundlerCalled afterBundler.init(TP) -
stop
public void stop() -
send
-
sendSingleMessage
- Throws:
Exception
-