Example usage for com.mongodb MongoOptions setWriteConcern

List of usage examples for com.mongodb MongoOptions setWriteConcern

Introduction

In this page you can find the example usage for com.mongodb MongoOptions setWriteConcern.

Prototype

public void setWriteConcern(final WriteConcern writeConcern) 

Source Link

Document

Sets the write concern.

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