public boolean nextConfig(long timeoutMillis, boolean isInitializing) {
        return acquireSnapshot(timeoutMillis, true, isInitializing);
    }
Use this for waiting for a new config that has changed, with the given timeout.

Returns true if:

It is the first time nextConfig() is called on this subscriber, and the framework has fetched config for all subscriptions. (Typically a first time config.)

or

All configs for the subscriber have a new generation since the last time nextConfig() was called, AND they have the same generation AND there is a change in config for at least one
of the configs. (Typically calls for a reconfig.)

You can check which configs are changed by calling {@link ConfigHandle#isChanged()} on the handle you got from {@link #subscribe(Class, String)}.

If the call times out, no handle will have the changed flag set. You should not configure anything then.

@param timeoutMillis timeout in milliseconds
@param isInitializing true if this the config is needed to create the initial configuration for the caller,
                      false if this is for reconfiguration
@return true if a config/reconfig of your system should happen
@throws ConfigInterruptedException if thread performing this call interrupted.
@throws SubscriberClosedException if subscriber is closed
config/src/main/java/com/yahoo/config/subscription/ConfigSubscriber.java