Example usage for com.mongodb MongoClientOptions builder

List of usage examples for com.mongodb MongoClientOptions builder

Introduction

In this page you can find the example usage for com.mongodb MongoClientOptions builder.

Prototype

public static Builder builder(final MongoClientOptions options) 

Source Link

Document

Creates a builder instance.

Usage

From source file:io.opentracing.contrib.mongo.TracingMongoClient.java

License:Apache License

public TracingMongoClient(Tracer tracer, final List<ServerAddress> seeds,
        final List<MongoCredential> credentialsList, final MongoClientOptions options,
        final MongoDriverInformation mongoDriverInformation) {
    super(seeds, credentialsList,
            MongoClientOptions.builder(options).addCommandListener(new TracingCommandListener(tracer)).build(),
            mongoDriverInformation);/* w  w  w. j a  v  a  2 s .  c  om*/
}

From source file:org.springframework.boot.autoconfigure.mongo.MongoClientFactory.java

License:Apache License

private Builder builder(MongoClientOptions options) {
    if (options != null) {
        return MongoClientOptions.builder(options);
    }/*from   w ww. j  a  v  a2s.  c  om*/
    return MongoClientOptions.builder();
}