protected void checkStateBeforeSubscribe() {
        synchronized (monitor) {
            if (state != State.OPEN)
                throw new IllegalStateException("Adding subscription after calling nextConfig() is not allowed");
        }
    }
Subscribes on the given type of {@link ConfigInstance} with the given config id and subscribe timeout.

The method blocks until the first config is ready to be fetched with {@link #nextConfig(boolean)}.

@param configClass The class, typically generated from a def-file using config-class-plugin
@param configId    Identifies the service in vespa-services.xml, or possibly raw:, file:, dir: or jar: type config which addresses config locally.
@param timeoutMillis The time to wait for a config to become available, in milliseconds
@return a ConfigHandle
config/src/main/java/com/yahoo/config/subscription/ConfigSubscriber.java