private static List<Long> getDeployedApplicationGenerations(Curator curator, Path appsPath) {
        ArrayList<Long> generations = new ArrayList<>();
        try {
            List<String> stringGenerations = curator.getChildren(appsPath);
            if (stringGenerations != null && !(stringGenerations.isEmpty())) {
                for (String s : stringGenerations) {
                    generations.add(Long.parseLong(s));
                }
            }
        } catch (RuntimeException e) {
            log.log(Level.WARNING, "Could not get application generations from Zookeeper");
        }
        return generations;
    }
Returns the application generation for the most recently deployed application from ZK,
or null if no application has been deployed yet

@return generation of the latest deployed application
configserver/src/main/java/com/yahoo/vespa/config/server/zookeeper/InitializedCounter.java