Example usage for com.mongodb MongoURI getOptions

List of usage examples for com.mongodb MongoURI getOptions

Introduction

In this page you can find the example usage for com.mongodb MongoURI getOptions.

Prototype

@SuppressWarnings("deprecation")
public MongoOptions getOptions() 

Source Link

Document

Gets the options.

Usage

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;
}