void setNodes(Collection<ConfiguredNode> newNodes, ContentCluster owner,
                  Distribution distribution, NodeListener nodeListener) {
        // Remove info for removed nodes
        Set<ConfiguredNode> newNodesSet = new HashSet<>(newNodes);
        for (ConfiguredNode existingNode : this.nodes.values()) {
            if ( ! newNodesSet.contains(existingNode)) {
                {
                    Node existingStorageNode = storageNodeInfo.remove(existingNode.index()).getNode();
                    allNodeInfo.remove(existingStorageNode);
                    nodeListener.handleRemovedNode(existingStorageNode);
                }

                {
                    Node existingDistributorNode = distributorNodeInfo.remove(existingNode.index()).getNode();
                    allNodeInfo.remove(existingDistributorNode);
                    nodeListener.handleRemovedNode(existingDistributorNode);
                }
            }
        }

        // Add and update new nodes info
        for (ConfiguredNode node : newNodes) {
            if ( ! nodes.containsKey(node.index())) { // add new node info
                addNodeInfo(new DistributorNodeInfo(owner, node.index(), null, distribution));
                addNodeInfo(new StorageNodeInfo(owner, node.index(), node.retired(), null, distribution));
            }
            else {
                getStorageNodeInfo(node.index()).setConfiguredRetired(node.retired());
            }
        }

        // Update node set
        nodes.clear();
        for (ConfiguredNode node : newNodes) {
            this.nodes.put(node.index(), node);
        }
    }
Sets the nodes which belongs to this cluster
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/ClusterInfo.java