void setConfigAndGeneration(Long generation, boolean applyOnRestart, T config, PayloadChecksums payloadChecksums) {
        T previousConfig = this.config.get().getConfig();
        boolean configChanged = ! Objects.equals(previousConfig, config);
        if (previousConfig != null && configChanged) {
            SnippetGenerator generator = new SnippetGenerator();
            int sizeHint = 500;
            log.log(Level.WARNING, "Config has changed unexpectedly for " + key + ", generation " + generation +
                    ", config in state :" + generator.makeSnippet(previousConfig.toString(), sizeHint) + ", new config: " +
                    generator.makeSnippet(config.toString(), sizeHint) +
                    ". This likely happened because config changed on a previous generation" +
                    ", look for earlier entry in log with warning about config changing without a change in config generation.");
        }
        this.config.set(new ConfigState<>(true, generation, applyOnRestart, configChanged, config, payloadChecksums));
    }
Called from {@link ConfigSubscriber} when the changed status of this config is propagated to the clients
config/src/main/java/com/yahoo/config/subscription/impl/ConfigSubscription.java