Examples of connectionsPerHost()


Examples of com.mongodb.MongoClientOptions.Builder.connectionsPerHost()

     * Connect the instance.
     */
    public synchronized MongoClient connect() {
        if (m == null) {
            Builder options = new MongoClientOptions.Builder();
            options.connectionsPerHost(maxConnections);
            options.threadsAllowedToBlockForConnectionMultiplier(threadsAllowedToBlockMultiplier);

            try {

                // Connect to replica servers if given. Else the standard way to one server.
View Full Code Here

Examples of com.mongodb.MongoClientOptions.Builder.connectionsPerHost()

  private Builder builder(MongoClientOptions options) {
    Builder builder = MongoClientOptions.builder();
    if (options != null) {
      builder.alwaysUseMBeans(options.isAlwaysUseMBeans());
      builder.connectionsPerHost(options.getConnectionsPerHost());
      builder.connectTimeout(options.getConnectTimeout());
      builder.cursorFinalizerEnabled(options.isCursorFinalizerEnabled());
      builder.dbDecoderFactory(options.getDbDecoderFactory());
      builder.dbEncoderFactory(options.getDbEncoderFactory());
      builder.description(options.getDescription());
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.