shutdown();
startUp(null);
}
for (Node n : clusterConfig.getNodes()) {
Node existing = oldConfig.getNode(n.getNodeId());
if (existing != null && !n.equals(existing)) {
// we already had this node's configuration, but it's
// changed. Disconnect from the node and let it
// reinitialize
logger.debug("[{}->{}] Configuration for node has changed",
getLocalNodeId(), n.getNodeId());
rpcService.disconnectNode(n.getNodeId());
}
}
for (Node n : oldConfig.getNodes()) {
Node nn = clusterConfig.getNode(n.getNodeId());
if (nn == null) {
// n is a node that doesn't appear in the new config
logger.debug("[{}->{}] Disconnecting deconfigured node",
getLocalNodeId(), n.getNodeId());
rpcService.disconnectNode(n.getNodeId());