Interface StatisticsGatherer

  • All Known Subinterfaces:
    Broker<X>, ProvidedStoreVirtualHost<X>, QueueManagingVirtualHost<X>
    All Known Implementing Classes:
    AbstractVirtualHost, BrokerImpl, ProvidedStoreVirtualHostImpl

    public interface StatisticsGatherer
    This interface is to be implemented by any broker business object that wishes to gather statistics about messages delivered through it. These statistics are exposed using a management interface, which calls these methods to retrieve the underlying statistics values. This interface gives a standard way for parts of the broker to set up and configure statistics collection.

    When creating these objects, there should be a parent/child relationship between them, such that the lowest level gatherer can record statistics if enabled, and pass on the notification to the parent object to allow higher level aggregation. When resetting statistics, this works in the opposite direction, with higher level gatherers also resetting all of their children.

    • Method Detail

      • registerMessageReceived

        void registerMessageReceived​(long messageSize)
        This method is responsible for registering the receipt of a message with the counters.
        Parameters:
        messageSize - the size in bytes of the delivered message
      • registerTransactedMessageReceived

        void registerTransactedMessageReceived()
      • registerMessageDelivered

        void registerMessageDelivered​(long messageSize)
        This method is responsible for registering the delivery of a message with the counters.
        Parameters:
        messageSize - the size in bytes of the delivered message
      • registerTransactedMessageDelivered

        void registerTransactedMessageDelivered()
      • getMessagesOut

        long getMessagesOut()
        Returns a number of delivered messages
        Returns:
        the number of delivered messages
      • getMessagesIn

        long getMessagesIn()
        Returns a number of received messages
        Returns:
        the number of received messages
      • getBytesOut

        long getBytesOut()
        Returns a number of delivered bytes
        Returns:
        the number of delivered bytes
      • getBytesIn

        long getBytesIn()
        Returns a number of received bytes
        Returns:
        the number of received bytes