public class TcpCommunicationMetricsListener extends Object
TcpCommunicationSpi
.Constructor and Description |
---|
TcpCommunicationMetricsListener(Ignite ignite,
IgniteSpiContext spiCtx) |
Modifier and Type | Method and Description |
---|---|
protected Map<UUID,Long> |
collectMessagesCountByNodeId(String metricName)
Collect messages count by nodeId
|
protected Map<String,Long> |
collectMessagesCountByType(String prefix)
Collect messages count by type
|
org.apache.ignite.internal.processors.metric.MetricRegistry |
metricRegistry()
Metrics registry.
|
void |
onMessageReceived(Message msg,
Object consistentId)
Collects statistics for message received by SPI.
|
void |
onMessageSent(Message msg,
Object consistentId)
Collects statistics for message sent by SPI.
|
void |
onNodeLeft(Object consistentId) |
long |
receivedBytesCount()
Gets received bytes count.
|
Map<UUID,Long> |
receivedMessagesByNode()
Gets received messages counts (grouped by node).
|
Map<String,Long> |
receivedMessagesByType()
Gets received messages counts (grouped by type).
|
static String |
receivedMessagesByTypeMetricName(Short directType)
Generate metric name by message direct type id.
|
int |
receivedMessagesCount()
Gets received messages count.
|
void |
resetMetrics()
Resets metrics for this instance.
|
long |
sentBytesCount()
Gets sent bytes count.
|
Map<UUID,Long> |
sentMessagesByNode()
Gets sent messages counts (grouped by node).
|
Map<String,Long> |
sentMessagesByType()
Gets sent messages counts (grouped by type).
|
static String |
sentMessagesByTypeMetricName(Short directType)
Generate metric name by message direct type id.
|
int |
sentMessagesCount()
Gets sent messages count.
|
public TcpCommunicationMetricsListener(Ignite ignite, IgniteSpiContext spiCtx)
public org.apache.ignite.internal.processors.metric.MetricRegistry metricRegistry()
public void onMessageSent(Message msg, Object consistentId)
msg
- Sent message.consistentId
- Receiver node consistent id.public void onMessageReceived(Message msg, Object consistentId)
msg
- Received message.consistentId
- Sender node consistent id.public int sentMessagesCount()
public long sentBytesCount()
public int receivedMessagesCount()
public long receivedBytesCount()
public Map<String,Long> receivedMessagesByType()
public Map<UUID,Long> receivedMessagesByNode()
public Map<String,Long> sentMessagesByType()
public Map<UUID,Long> sentMessagesByNode()
protected Map<String,Long> collectMessagesCountByType(String prefix)
protected Map<UUID,Long> collectMessagesCountByNodeId(String metricName)
public void resetMetrics()
public void onNodeLeft(Object consistentId)
consistentId
- Consistent id of the node.public static String sentMessagesByTypeMetricName(Short directType)
GridGain In-Memory Computing Platform : ver. 8.9.19 Release Date : April 10 2025