docs: void apply( Changes changes ) throws Exception {
          try {
              stateLock.lock();
              logger.debug("Applying changes to '{0}' repository configuration: {1} --> {2}", repositoryName, changes, config);
              // Get the configuration and apply the same changes ...
              final RepositoryConfiguration oldConfiguration = this.config.get();
              Editor copy = oldConfiguration.edit();
              ConfigurationChange configChanges = new ConfigurationChange();
              copy.apply(changes, configChanges);
  
              // Always update the configuration ...
              RunningState oldState = this.runningState.get();
              this.config.set(new RepositoryConfiguration(copy.unwrap(), copy.getString(FieldName.NAME),
                                                          oldConfiguration.environment()));
              if (oldState != null) {
                  assert state.get() == State.RUNNING;
                  // Repository is running, so create a new running state ...
                  RunningState newState = new RunningState(oldState, configChanges);
                  this.runningState.set(newState);
  
                  // Handle a few special cases that the running state doesn't really handle itself ...
                  if (!configChanges.storageChanged && configChanges.predefinedWorkspacesChanged) refreshWorkspaces();
                  if (configChanges.nameChanged) repositoryNameChanged();
                  if (configChanges.connectorsChanged) {
                      newState.connectors.restart(config.get().getFederation());
                  }
              }
              logger.debug("Applied changes to '{0}' repository configuration: {1} --> {2}", repositoryName, changes, config);
          } finally {
              stateLock.unlock();
          }
      }