Class JGroupsMetricsManagerImpl

java.lang.Object
org.infinispan.remoting.transport.jgroups.JGroupsMetricsManagerImpl
All Implemented Interfaces:
JGroupsMetricsManager

public class JGroupsMetricsManagerImpl extends Object implements JGroupsMetricsManager
Concrete implementation of JGroupsMetricsManager.

It listens on view change to remove metrics for members that left the cluster.

  • Constructor Details

    • JGroupsMetricsManagerImpl

      public JGroupsMetricsManagerImpl(boolean histogramEnabled)
  • Method Details

    • start

      public void start()
    • stop

      public void stop()
    • onViewChanged

      public void onViewChanged(ViewChangedEvent event)
    • trackRequest

      public RequestTracker trackRequest(Address destination)
      Description copied from interface: JGroupsMetricsManager
      Track the latency for a synchronous request.
      Specified by:
      trackRequest in interface JGroupsMetricsManager
      Parameters:
      destination - The destination address. Cannot be null.
      Returns:
      A RequestTracker implementation with the send time already set.
    • recordMessageSent

      public void recordMessageSent(Address destination, int bytesSent, boolean async)
      Description copied from interface: JGroupsMetricsManager
      Records a message sent to a destination.

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

      Specified by:
      recordMessageSent in interface JGroupsMetricsManager
      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

      public void onChannelConnected(org.jgroups.JChannel channel, boolean isMainChannel)
      Description copied from interface: JGroupsMetricsManager
      Registers metrics for a JChannel.
      Specified by:
      onChannelConnected in interface JGroupsMetricsManager
      Parameters:
      channel - The JChannel instance.
      isMainChannel - Set to true if this is the main channel (the cluster channel, not cross-site).
    • onChannelDisconnected

      public void onChannelDisconnected(org.jgroups.JChannel channel)
      Description copied from interface: JGroupsMetricsManager
      Unregisters metrics for a JChannel.
      Specified by:
      onChannelDisconnected in interface JGroupsMetricsManager
      Parameters:
      channel - The JChannel instance.