コード例 #1
0
  /**
   * Parse a configuration associated with a JE environment and create an environment config from
   * it.
   *
   * @param cfg The configuration to be parsed.
   * @return An environment config instance corresponding to the config entry.
   * @throws ConfigException If there is an error in the provided configuration entry.
   */
  public static EnvironmentConfig parseConfigEntry(JEBackendCfg cfg) throws ConfigException {
    validateDbCacheSize(cfg.getDBCacheSize());

    EnvironmentConfig envConfig = defaultConfig();
    setDurability(envConfig, cfg.isDBTxnNoSync(), cfg.isDBTxnWriteNoSync());
    setJEProperties(cfg, envConfig, cfg.dn().rdn().getAttributeValue(0));
    setDBLoggingLevel(envConfig, cfg.getDBLoggingLevel(), cfg.dn(), cfg.isDBLoggingFileHandlerOn());

    // See if there are any native JE properties specified in the config
    // and if so try to parse, evaluate and set them.
    return setJEProperties(envConfig, cfg.getJEProperty(), attrMap);
  }