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 TypeMethodDescriptionvoid
onChannelConnected
(org.jgroups.JChannel channel, boolean isMainChannel) Registers metrics for aJChannel
.void
onChannelDisconnected
(org.jgroups.JChannel channel) Unregisters metrics for aJChannel
.void
recordMessageSent
(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
RequestTracker
implementation 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 totrue
if the message is asynchronous.
-
onChannelConnected
void onChannelConnected(org.jgroups.JChannel channel, boolean isMainChannel) Registers metrics for aJChannel
.- Parameters:
channel
- TheJChannel
instance.isMainChannel
- Set totrue
if this is the main channel (the cluster channel, not cross-site).
-
onChannelDisconnected
void onChannelDisconnected(org.jgroups.JChannel channel) Unregisters metrics for aJChannel
.- Parameters:
channel
- TheJChannel
instance.
-