Interface Bundler
- All Known Implementing Classes:
BaseBundler, NoBundler, PerDestinationBundler, TransferQueueBundler
public interface Bundler
Pluggable way to collect messages and send them as batches
- Since:
- 4.0
- Author:
- Bela Ban
-
Method Summary
Modifier and TypeMethodDescriptiondefault voiddestroy()default intIf the bundler implementation supports a capacity, then return it, else return -1intMaximum 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.default voidCalled after creation of the bundlerdefault voiddefault voidvoiddefault BundlersetMaxSize(int s) intsize()The number of unsent messages in the bundlervoidstart()Called afterinit(TP)voidstop()default voidviewChange(View view)
-
Method Details
-
init
Called after creation of the bundler- Parameters:
transport- the transport, for further reference
-
start
void start()Called afterinit(TP) -
stop
void stop() -
destroy
default void destroy() -
send
-
viewChange
-
size
int size()The number of unsent messages in the bundler -
getQueueSize
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. 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. -
getCapacity
default int getCapacity()If the bundler implementation supports a capacity, then return it, else return -1 -
getMaxSize
int getMaxSize()Maximum number of bytes for messages to be queued until they are sent -
setMaxSize
-
renameThread
default void renameThread() -
resetStats
default void resetStats()
-