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 TypeMethodDescriptionvoidonChannelConnected(org.jgroups.JChannel channel, boolean isMainChannel) Registers metrics for aJChannel.voidonChannelDisconnected(org.jgroups.JChannel channel) Unregisters metrics for aJChannel.voidrecordMessageSent(Address destination, int bytesSent, boolean async) Records a message sent to adestination.trackRequest(Address destination) Track the latency for a synchronous request.
-
Method Details
-
trackRequest
Track the latency for a synchronous request.- Parameters:
destination- The destination address. Cannot be null.- Returns:
- A
RequestTrackerimplementation with the send time already set.
-
recordMessageSent
Records a message sent to adestination.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 totrueif the message is asynchronous.
-
onChannelConnected
void onChannelConnected(org.jgroups.JChannel channel, boolean isMainChannel) Registers metrics for aJChannel.- Parameters:
channel- TheJChannelinstance.isMainChannel- Set totrueif this is the main channel (the cluster channel, not cross-site).
-
onChannelDisconnected
void onChannelDisconnected(org.jgroups.JChannel channel) Unregisters metrics for aJChannel.- Parameters:
channel- TheJChannelinstance.
-