Interface Bundler

All Known Implementing Classes:
AlternatingBundler, AsyncNoBundler, BaseBundler, BatchBundler, NoBundler, PerDestinationBundler, RemoveQueueBundler, RingBufferBundler, RingBufferBundlerLockless, RingBufferBundlerLockless2, SenderSendsBundler, SimplifiedTransferQueueBundler, TransferQueueBundler, TransferQueueBundler2

public interface Bundler
Pluggable way to collect messages and send them as batches
Since:
4.0
  • Method Summary

    Modifier and Type
    Method
    Description
    default int
    If the bundler implementation supports a capacity (e.g.
    int
    Maximum number of bytes for messages to be queued until they are sent
    int
    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.
    default void
    init(TP transport)
    Called after creation of the bundler
    default void
     
    default void
     
    void
     
    default Bundler
    setMaxSize(int s)
     
    int
    The number of unsent messages in the bundler
    void
    Called after init(TP)
    void
     
    default void
     
  • Method Details

    • init

      default void init(TP transport)
      Called after creation of the bundler
      Parameters:
      transport - the transport, for further reference
    • start

      void start()
      Called after init(TP)
    • stop

      void stop()
    • send

      void send(Message msg) throws Exception
      Throws:
      Exception
    • viewChange

      default void viewChange(View view)
    • 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 (e.g. RingBufferBundler, then return it, else return -1
    • getMaxSize

      int getMaxSize()
      Maximum number of bytes for messages to be queued until they are sent
    • setMaxSize

      default Bundler setMaxSize(int s)
    • renameThread

      default void renameThread()
    • resetStats

      default void resetStats()