public void setGlobalStateRestoreListener(final StateRestoreListener globalStateRestoreListener) {
        synchronized (stateLock) {
            if (state.hasNotStarted()) {
                delegatingStateRestoreListener.setUserStateRestoreListener(globalStateRestoreListener);
            } else {
                throw new IllegalStateException("Can only set GlobalStateRestoreListener before calling start(). " +
                    "Current state is: " + state);
            }
        }
    }
Set the listener which is triggered whenever a {@link StateStore} is being restored in order to resume
processing.

@param globalStateRestoreListener The listener triggered when {@link StateStore} is being restored.
@throws IllegalStateException if this {@code KafkaStreams} instance has already been started.
streams/src/main/java/org/apache/kafka/streams/KafkaStreams.java