use of org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeFailedMessage in project ignite by apache.
the class ClientImpl method failNode.
/** {@inheritDoc} */
@Override
public void failNode(UUID nodeId, @Nullable String warning) {
TcpDiscoveryNode node = rmtNodes.get(nodeId);
if (node != null) {
TcpDiscoveryNodeFailedMessage msg = new TcpDiscoveryNodeFailedMessage(getLocalNodeId(), node.id(), node.internalOrder());
msg.warning(warning);
msg.force(true);
msgWorker.addMessage(msg);
}
}
use of org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeFailedMessage in project ignite by apache.
the class ServerImpl method failNode.
/** {@inheritDoc} */
@Override
public void failNode(UUID nodeId, @Nullable String warning) {
TcpDiscoveryNode node = ring.node(nodeId);
if (node != null) {
TcpDiscoveryNodeFailedMessage msg = new TcpDiscoveryNodeFailedMessage(getLocalNodeId(), node.id(), node.internalOrder());
msg.warning(warning);
msg.force(true);
msgWorker.addMessage(msg);
}
}
use of org.apache.ignite.spi.discovery.tcp.messages.TcpDiscoveryNodeFailedMessage in project ignite by apache.
the class ServerImpl method forceNextNodeFailure.
/**
* <strong>FOR TEST ONLY!!!</strong>
* <p>
* Simulates situation when next node is still alive but is bypassed
* since it has been excluded from the ring, possibly, due to short time
* network problems.
* <p>
* This method is intended for test purposes only.
*/
void forceNextNodeFailure() {
U.warn(log, "Next node will be forcibly failed (if any).");
TcpDiscoveryNode next;
synchronized (mux) {
next = ring.nextNode(failedNodes.keySet());
}
if (next != null)
msgWorker.addMessage(new TcpDiscoveryNodeFailedMessage(getLocalNodeId(), next.id(), next.internalOrder()));
}
Aggregations