Search in sources :

Example 1 with TcpDiscoveryStatusCheckMessage

use of org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryStatusCheckMessage in project ignite by apache.

the class ServerImpl method pingNode.

/** {@inheritDoc} */
@Override
public boolean pingNode(UUID nodeId) {
    assert nodeId != null;
    if (log.isDebugEnabled())
        log.debug("Pinging node: " + nodeId + "]");
    if (nodeId == getLocalNodeId())
        return true;
    TcpDiscoveryNode node = ring.node(nodeId);
    if (node == null)
        return false;
    if (!nodeAlive(nodeId))
        return false;
    boolean res = pingNode(node);
    if (!res && !node.isClient() && nodeAlive(nodeId)) {
        LT.warn(log, "Failed to ping node (status check will be initiated): " + nodeId);
        msgWorker.addMessage(new TcpDiscoveryStatusCheckMessage(locNode, node.id()));
    }
    return res;
}
Also used : TcpDiscoveryStatusCheckMessage(org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryStatusCheckMessage) TcpDiscoveryNode(org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode)

Aggregations

TcpDiscoveryNode (org.apache.ignite.spi.discovery.tcp.internal.TcpDiscoveryNode)1 TcpDiscoveryStatusCheckMessage (org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryStatusCheckMessage)1