Example usage for com.mongodb ReadPreference PRIMARY_PREFERRED

List of usage examples for com.mongodb ReadPreference PRIMARY_PREFERRED

Introduction

In this page you can find the example usage for com.mongodb ReadPreference PRIMARY_PREFERRED.

Prototype

ReadPreference PRIMARY_PREFERRED

To view the source code for com.mongodb ReadPreference PRIMARY_PREFERRED.

Click Source Link

Usage

From source file:org.opencb.commons.datastore.mongodb.MongoDataStoreManager.java

License:Apache License

private void init() {
    dataStoreServerAddresses = new ArrayList<>();
    readPreference = MongoDBConfiguration.ReadPreference.PRIMARY_PREFERRED;
    writeConcern = "";

    logger = LoggerFactory.getLogger(MongoDataStoreManager.class);
}