private void watchPortChange() {
        Subscriber subscriber = subscriberFactory.getSubscriber(Collections.singleton(new ConfigKey<>(QrConfig.class, configId)),
                                                                "portWatcher");
        try {
            while (true) {
                subscriber.waitNextGeneration(false);
                if (first(subscriber.config().values()) instanceof QrConfig newConfig) {
                    reconfigure(newConfig.shutdown());
                    synchronized (this) {
                        var currRpc = qrConfig.rpc();
                        var newRpc = newConfig.rpc();
                        boolean reListen = (currRpc.port() != newRpc.port()) ||
                                           (currRpc.enabled() != newRpc.enabled()) ||
                                           ! Objects.equals(currRpc.host(), newRpc.host()) ||
                                           ! Objects.equals(currRpc.slobrokId(), newRpc.slobrokId());
                        if (reListen) {
                            if (currRpc.port() != newRpc.port()) {
                                log.log(Level.INFO, "Rpc port changed from " + currRpc.port() + " to " + newRpc.port());
                            }
                            if (currRpc.enabled() != newRpc.enabled()) {
                                log.log(Level.INFO, "Rpc server " + (newRpc.enabled() ? "enabled" : "disabled"));
                            }
                            if ( ! Objects.equals(currRpc.host(), newRpc.host())) {
                                log.log(Level.INFO, "Rpc host changed from " + currRpc.host() + " to " + newRpc.host());
                            }
                            if ( ! Objects.equals(currRpc.slobrokId(), newRpc.slobrokId())) {
                                log.log(Level.INFO, "Rpc slobrokid changed from " + currRpc.slobrokId() + " to " + newRpc.slobrokId());
                            }
                            try {
                                reListenRpc(newConfig);
                            } catch (Throwable e) {
                                com.yahoo.protect.Process.logAndDie("Rpc port config has changed from "
                                        + qrConfig.rpc().port() + " to " + newConfig.rpc().port() +
                                        ", and we were not able to reconfigure so we will just bail out and restart.", e);
                            }
                        }
                        qrConfig = newConfig;
                    }
                    log.fine("Received new QrConfig :" + newConfig);
                }
            }
        } finally {
            subscriber.close();
        }
    }
Do not delete this method even if it's empty.
Calling this methods forces this class to be loaded,
which runs the static block.
container-disc/src/main/java/com/yahoo/container/jdisc/ConfiguredApplication.java