/**
   * Changes the mutable config properties that are present in the given config, and notifies all
   * config observer.
   */
  public synchronized void setMutableConfig(EnvironmentMutableConfig config)
      throws DatabaseException {

    /* Clone the current config. */
    EnvironmentConfig newConfig = DbInternal.cloneConfig(configManager.getEnvironmentConfig());

    /* Copy in the mutable props. */
    DbInternal.copyMutablePropsTo(config, newConfig);

    /*
     * Update the current config and notify observers. The config manager is
     * replaced with a new instance that uses the new configuration. This
     * avoid synchronization issues: other threads that have a referenced to
     * the old configuration object are not impacted.
     *
     * Notify listeners in reverse order of registration so that the
     * environment listener is notified last and it can start daemon threads
     * after they are configured.
     */
    configManager = new DbConfigManager(newConfig);
    for (int i = configObservers.size() - 1; i >= 0; i -= 1) {
      EnvConfigObserver o = (EnvConfigObserver) configObservers.get(i);
      o.envConfigUpdate(configManager);
    }
  }
  /** Throws an exception if an immutable property is changed. */
  public void checkImmutablePropsForEquality(EnvironmentConfig config)
      throws IllegalArgumentException {

    DbInternal.checkImmutablePropsForEquality(configManager.getEnvironmentConfig(), config);
  }
 /** Clones the current mutable configuration. */
 public EnvironmentMutableConfig cloneMutableConfig() {
   return DbInternal.cloneMutableConfig(configManager.getEnvironmentConfig());
 }