List of usage examples for com.mongodb MongoClientSettings builder
public static Builder builder(final MongoClientSettings settings)
From source file:io.opentracing.contrib.mongo.TracingAsyncMongoClient.java
License:Apache License
public TracingAsyncMongoClient(final Tracer tracer, final MongoClientSettings settings, final MongoDriverInformation mongoDriverInformation) { TracingCommandListener tracingCommandListener = new TracingCommandListener(tracer); this.mongoClient = MongoClients.create( MongoClientSettings.builder(settings).addCommandListener(tracingCommandListener).build(), mongoDriverInformation);// w w w. ja v a 2 s . co m }