Class AbstractMetricsCollector

    • Constructor Detail

      • AbstractMetricsCollector

        public AbstractMetricsCollector()
    • Method Detail

      • cleanStaleState

        public void cleanStaleState()
        Clean inner state for close connections and channels. Inner state is automatically cleaned on connection and channel closing. Thus, this method is provided as a safety net, to be externally called periodically if closing of resources wouldn't work properly for some corner cases.
      • incrementConnectionCount

        protected abstract void incrementConnectionCount​(Connection connection)
        Increments connection count. The connection object is passed in as complementary information and without any guarantee of not being null.
        Parameters:
        connection - the connection that has been created (can be null)
      • decrementConnectionCount

        protected abstract void decrementConnectionCount​(Connection connection)
        Decrements connection count. The connection object is passed in as complementary information and without any guarantee of not being null.
        Parameters:
        connection - the connection that has been closed (can be null)
      • incrementChannelCount

        protected abstract void incrementChannelCount​(Channel channel)
        Increments channel count. The channel object is passed in as complementary information and without any guarantee of not being null.
        Parameters:
        channel - the channel that has been created (can be null)
      • decrementChannelCount

        protected abstract void decrementChannelCount​(Channel channel)
        Decrements channel count. The channel object is passed in as complementary information and without any guarantee of not being null.
        Parameters:
        channel -
      • markPublishedMessage

        protected abstract void markPublishedMessage()
        Marks the event of a published message.
      • markConsumedMessage

        protected abstract void markConsumedMessage()
        Marks the event of a consumed message.
      • markAcknowledgedMessage

        protected abstract void markAcknowledgedMessage()
        Marks the event of an acknowledged message.
      • markRejectedMessage

        protected abstract void markRejectedMessage()
        Marks the event of a rejected message.