Class NoBundler

java.lang.Object
org.jgroups.protocols.NoBundler
All Implemented Interfaces:
Bundler
Direct Known Subclasses:
AsyncNoBundler, BatchBundler

public class NoBundler extends Object implements Bundler
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 Details

    • transport

      protected TP transport
    • log

      protected Log log
  • Constructor Details

    • NoBundler

      public NoBundler()
  • Method Details

    • size

      public int size()
      Description copied from interface: Bundler
      The number of unsent messages in the bundler
      Specified by:
      size in interface Bundler
    • getMaxSize

      public int getMaxSize()
      Description copied from interface: Bundler
      Maximum number of bytes for messages to be queued until they are sent
      Specified by:
      getMaxSize in interface Bundler
    • init

      public void init(TP transport)
      Description copied from interface: Bundler
      Called after creation of the bundler
      Specified by:
      init in interface Bundler
      Parameters:
      transport - the transport, for further reference
    • 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 interface Bundler
    • start

      public void start()
      Description copied from interface: Bundler
      Called after Bundler.init(TP)
      Specified by:
      start in interface Bundler
    • stop

      public void stop()
      Specified by:
      stop in interface Bundler
    • send

      public void send(Message msg) throws Exception
      Specified by:
      send in interface Bundler
      Throws:
      Exception
    • sendSingleMessage

      protected void sendSingleMessage(Message msg, ByteArrayDataOutputStream output) throws Exception
      Throws:
      Exception