mongodb/src/main/java/site/ycsb/db/OptionsSupport.java [29:84]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private static final String UNAVAILABLE = "n/a";

  /**
   * Updates the URL with the appropriate attributes if legacy properties are
   * set and the URL does not have the property already set.
   *
   * @param url
   *          The URL to update.
   * @param props
   *          The legacy properties.
   * @return The updated URL.
   */
  public static String updateUrl(String url, Properties props) {
    String result = url;

    // max connections.
    final String maxConnections =
        props.getProperty("mongodb.maxconnections", UNAVAILABLE).toLowerCase();
    if (!UNAVAILABLE.equals(maxConnections)) {
      result = addUrlOption(result, "maxPoolSize", maxConnections);
    }

    // Blocked thread multiplier.
    final String threadsAllowedToBlockForConnectionMultiplier =
        props
            .getProperty(
                "mongodb.threadsAllowedToBlockForConnectionMultiplier",
                UNAVAILABLE).toLowerCase();
    if (!UNAVAILABLE.equals(threadsAllowedToBlockForConnectionMultiplier)) {
      result =
          addUrlOption(result, "waitQueueMultiple",
              threadsAllowedToBlockForConnectionMultiplier);
    }

    // write concern
    String writeConcernType =
        props.getProperty("mongodb.writeConcern", UNAVAILABLE).toLowerCase();
    if (!UNAVAILABLE.equals(writeConcernType)) {
      if ("errors_ignored".equals(writeConcernType)) {
        result = addUrlOption(result, "w", "0");
      } else if ("unacknowledged".equals(writeConcernType)) {
        result = addUrlOption(result, "w", "0");
      } else if ("acknowledged".equals(writeConcernType)) {
        result = addUrlOption(result, "w", "1");
      } else if ("journaled".equals(writeConcernType)) {
        result = addUrlOption(result, "journal", "true"); // this is the
        // documented option
        // name
        result = addUrlOption(result, "j", "true"); // but keep this until
        // MongoDB Java driver
        // supports "journal" option
      } else if ("replica_acknowledged".equals(writeConcernType)) {
        result = addUrlOption(result, "w", "2");
      } else if ("majority".equals(writeConcernType)) {
        result = addUrlOption(result, "w", "majority");
      } else {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



mongodbreactivestreams/src/main/java/site/ycsb/db/OptionsSupport.java [32:87]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
  private static final String UNAVAILABLE = "n/a";

  /**
   * Updates the URL with the appropriate attributes if legacy properties are
   * set and the URL does not have the property already set.
   *
   * @param url
   *          The URL to update.
   * @param props
   *          The legacy properties.
   * @return The updated URL.
   */
  public static String updateUrl(String url, Properties props) {
    String result = url;

    // max connections.
    final String maxConnections =
        props.getProperty("mongodb.maxconnections", UNAVAILABLE).toLowerCase();
    if (!UNAVAILABLE.equals(maxConnections)) {
      result = addUrlOption(result, "maxPoolSize", maxConnections);
    }

    // Blocked thread multiplier.
    final String threadsAllowedToBlockForConnectionMultiplier =
        props
            .getProperty(
                "mongodb.threadsAllowedToBlockForConnectionMultiplier",
                UNAVAILABLE).toLowerCase();
    if (!UNAVAILABLE.equals(threadsAllowedToBlockForConnectionMultiplier)) {
      result =
          addUrlOption(result, "waitQueueMultiple",
              threadsAllowedToBlockForConnectionMultiplier);
    }

    // write concern
    String writeConcernType =
        props.getProperty("mongodb.writeConcern", UNAVAILABLE).toLowerCase();
    if (!UNAVAILABLE.equals(writeConcernType)) {
      if ("errors_ignored".equals(writeConcernType)) {
        result = addUrlOption(result, "w", "0");
      } else if ("unacknowledged".equals(writeConcernType)) {
        result = addUrlOption(result, "w", "0");
      } else if ("acknowledged".equals(writeConcernType)) {
        result = addUrlOption(result, "w", "1");
      } else if ("journaled".equals(writeConcernType)) {
        result = addUrlOption(result, "journal", "true"); // this is the
        // documented option
        // name
        result = addUrlOption(result, "j", "true"); // but keep this until
        // MongoDB Java driver
        // supports "journal" option
      } else if ("replica_acknowledged".equals(writeConcernType)) {
        result = addUrlOption(result, "w", "2");
      } else if ("majority".equals(writeConcernType)) {
        result = addUrlOption(result, "w", "majority");
      } else {
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



