public class GridTcpDiscoveryHeartbeatMessage extends GridTcpDiscoveryAbstractMessage
It is sent by coordinator node across the ring once a configured period. In case if topology does not use metrics store, message makes two passes.
If topology uses metrics store then message makes only one pass and metrics map is always empty. Nodes exchange their metrics using metrics store.
| Constructor and Description |
|---|
GridTcpDiscoveryHeartbeatMessage()
Public default no-arg constructor for
Externalizable interface. |
GridTcpDiscoveryHeartbeatMessage(UUID creatorNodeId)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
hasMetrics() |
boolean |
hasMetrics(UUID nodeId) |
Map<UUID,GridNodeMetrics> |
metrics()
Gets metrics map.
|
void |
readExternal(ObjectInput in) |
void |
removeMetrics(UUID nodeId)
Removes metrics for particular node from the message.
|
void |
setMetrics(UUID nodeId,
GridNodeMetrics metrics)
Sets metrics for particular node.
|
String |
toString() |
void |
writeExternal(ObjectOutput out) |
creatorNodeId, equals, hashCode, id, senderNodeId, senderNodeId, topologyVersion, topologyVersion, verified, verifierNodeId, verifypublic GridTcpDiscoveryHeartbeatMessage()
Externalizable interface.public GridTcpDiscoveryHeartbeatMessage(UUID creatorNodeId)
creatorNodeId - Creator node.public void setMetrics(UUID nodeId, GridNodeMetrics metrics)
nodeId - Node ID.metrics - Node metrics.public void removeMetrics(UUID nodeId)
nodeId - Node ID.public Map<UUID,GridNodeMetrics> metrics()
public boolean hasMetrics()
True if this message contains metrics.public boolean hasMetrics(UUID nodeId)
True if this message contains metrics.public void writeExternal(ObjectOutput out) throws IOException
writeExternal in interface ExternalizablewriteExternal in class GridTcpDiscoveryAbstractMessageIOExceptionpublic void readExternal(ObjectInput in) throws IOException, ClassNotFoundException
readExternal in interface ExternalizablereadExternal in class GridTcpDiscoveryAbstractMessageIOExceptionClassNotFoundExceptionpublic String toString()
toString in class GridTcpDiscoveryAbstractMessageCopyright © 2014. All rights reserved.