Interface JGroupsMetricsManager

All Known Implementing Classes:
JGroupsMetricsManagerImpl, NoOpJGroupsMetricManager

public interface JGroupsMetricsManager
Stores and register metrics statistics related to JGroups, including the protocol metrics and per destination metrics information (latency, bytes sent, etc.).
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    onChannelConnected(org.jgroups.JChannel channel, boolean isMainChannel)
    Registers metrics for a JChannel.
    void
    onChannelDisconnected(org.jgroups.JChannel channel)
    Unregisters metrics for a JChannel.
    void
    recordMessageSent(Address destination, int bytesSent, boolean async)
    Records a message sent to a destination.
    trackRequest(Address destination)
    Track the latency for a synchronous request.
  • Method Details

    • trackRequest

      RequestTracker trackRequest(Address destination)
      Track the latency for a synchronous request.
      Parameters:
      destination - The destination address. Cannot be null.
      Returns:
      A RequestTracker implementation with the send time already set.
    • recordMessageSent

      void recordMessageSent(Address destination, int bytesSent, boolean async)
      Records a message sent to a destination.

      Updates the bytes sent and, if it is an async message, the async counter.

      Parameters:
      destination - The destination address. Cannot be null.
      bytesSent - The number of bytes sent in the message.
      async - Set to true if the message is asynchronous.
    • onChannelConnected

      void onChannelConnected(org.jgroups.JChannel channel, boolean isMainChannel)
      Registers metrics for a JChannel.
      Parameters:
      channel - The JChannel instance.
      isMainChannel - Set to true if this is the main channel (the cluster channel, not cross-site).
    • onChannelDisconnected

      void onChannelDisconnected(org.jgroups.JChannel channel)
      Unregisters metrics for a JChannel.
      Parameters:
      channel - The JChannel instance.