private void waitForShutdown() {
        synchronized (signalCaught) {
            while (!signalCaught.get()) {
                try {
                    signalCaught.wait();
                } catch (InterruptedException e) {
                    // empty
                }
            }
        }
        ExecutorService executor = Executors.newSingleThreadExecutor(threadFactory);
        Callable<String> stopper = () -> { stop(); return "clean shutdown"; };
        Future<String> future = executor.submit(stopper);
        try {
            String result = future.get(5, TimeUnit.SECONDS);
            Event.stopping("configproxy", result);
        } catch (Exception e) {
            System.exit(1);
        }
        System.exit(0);
    }
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