void setMode(String modeName) {
        if (modeName.equals(this.mode.name())) return;

        Mode oldMode = this.mode;
        Mode newMode = new Mode(modeName);
        switch (newMode.getMode()) {
            case MEMORYCACHE:
                configClient.shutdownSourceConnections();
                configClient = new MemoryCacheConfigClient(configClient.memoryCache());
                this.mode = new Mode(modeName);
                break;
            case DEFAULT:
                flush();
                configClient = createRpcClient(configSource);
                this.mode = new Mode(modeName);
                break;
            default:
                throw new IllegalArgumentException("Cannot set invalid mode '" + modeName + "'");
        }
        log.log(Level.INFO, "Switched from '" + oldMode.name().toLowerCase() + "' mode to '" + getMode().name().toLowerCase() + "' mode");
    }
A proxy server that handles RPC config requests. The proxy can run in two modes:
'default' and 'memorycache', where the last one will not get config from an upstream
config source, but will serve config from memory cache only.

@author hmusum
config-proxy/src/main/java/com/yahoo/vespa/config/proxy/ProxyServer.java