public void cycleCompleted() {
        Map<Integer, Integer> copy;
        synchronized (nextMasterData) {
            if (nextMasterData.equals(masterData)) {
                log.log(Level.FINE, () -> "Fleetcontroller " + nodeIndex + ": No change in master data detected, not sending it on");
                // for(Integer i : nextMasterData.keySet()) { System.err.println(i + " -> " + nextMasterData.get(i)); }
                return;
            }
            masterData = new TreeMap<>(nextMasterData);
            copy = masterData;
        }
        log.log(Level.FINE, () -> "Fleetcontroller " + nodeIndex + ": Got new master data, sending it on");
        listener.handleMasterData(copy);
    }
Function to be called when we have new consistent master election.
clustercontroller-core/src/main/java/com/yahoo/vespa/clustercontroller/core/database/MasterDataGatherer.java