List of usage examples for com.mongodb MongoURI getOptions
@SuppressWarnings("deprecation") public MongoOptions getOptions()
From source file:org.eclipse.birt.data.oda.mongodb.impl.MongoDBDriver.java
License:Open Source License
private static MongoOptions getURIOptions(MongoURI mongoUri) { MongoOptions uriOptions = mongoUri.getOptions(); // explicitly adopts those default client options, which were overridden // by MongoClientOptions.Builder#legacyDefaults() uriOptions.setConnectionsPerHost(sm_defaultClientOptions.getConnectionsPerHost()); uriOptions.setWriteConcern(sm_defaultClientOptions.getWriteConcern()); return uriOptions; }