public void processResult(int version, String path, Object context, List<String> nodes) {
            if (nodes == null) nodes = new LinkedList<>();
            log.log(Level.INFO, "Fleetcontroller " + nodeIndex + ": Got node list response from " + path + " version " + version + " with " + nodes.size() + " nodes");
            synchronized (nextMasterData) {
                nextMasterData.clear();
                for (String node : nodes) {
                    int index = Integer.parseInt(node);
                    nextMasterData.put(index, null);
                    log.log(Level.FINE, () -> "Fleetcontroller " + nodeIndex + ": Attempting to fetch data in node '"
                                              + paths.indexOf(index) + "' to see vote");
                    session.getData(paths.indexOf(index), changeWatcher, nodeListener, null);
                    // Invocation of cycleCompleted() for fully accumulated election state will happen
                    // as soon as all getData calls have been processed.
                }
            }
        }
The dir callback class is responsible for handling dir change events (nodes coming up or going down).
It will explicitly request the contents of, and set a watch on, all nodes that are present. Nodes
for controllers that have disappeared from ZooKeeper are implicitly removed from nextMasterData.
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/database/MasterDataGatherer.java