Class PerDestinationBundler

  • All Implemented Interfaces:
    Bundler

    public class PerDestinationBundler
    extends BaseBundler
    Queues messages per destination ('null' is a special destination). Uses 1 thread per destination to process queued messages, so it won't scale to many cluster members (unless virtual threads are used).
    See https://issues.redhat.com/browse/JGRP-2639 for details.
    Since:
    5.2.7
    Author:
    Bela Ban
    • Constructor Detail

      • PerDestinationBundler

        public PerDestinationBundler()
    • Method Detail

      • 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
        Overrides:
        getQueueSize in class BaseBundler
      • size

        public int size()
        Description copied from class: BaseBundler
        Returns the total number of messages in the hashmap
        Specified by:
        size in interface Bundler
        Overrides:
        size in class BaseBundler
      • dump

        public java.lang.String dump()
      • dests

        public java.lang.String dests()
      • init

        public void init​(TP transport)
        Description copied from interface: Bundler
        Called after creation of the bundler
        Specified by:
        init in interface Bundler
        Overrides:
        init in class BaseBundler
        Parameters:
        transport - the transport, for further reference
      • send

        public void send​(Message msg)
                  throws java.lang.Exception
        Specified by:
        send in interface Bundler
        Overrides:
        send in class BaseBundler
        Throws:
        java.lang.Exception