Example usage for com.mongodb MongoClientOptions getRequiredReplicaSetName

List of usage examples for com.mongodb MongoClientOptions getRequiredReplicaSetName

Introduction

In this page you can find the example usage for com.mongodb MongoClientOptions getRequiredReplicaSetName.

Prototype

@Nullable
public String getRequiredReplicaSetName() 

Source Link

Document

Gets the required replica set name.

Usage

From source file:io.dirigible.mongodb.jdbc.MongodbConnection.java

License:Apache License

private Properties mongoClientOptionsAsProperties(MongoClientOptions ops, Properties props) {
    //TODO: write complex object properties too?
    if (ops.getDescription() != null)
        props.setProperty("description", ops.getDescription());
    if (ops.getRequiredReplicaSetName() != null)
        props.setProperty("requiredReplicaSetName", ops.getRequiredReplicaSetName());
    props.setProperty("connectionsPerHost", "" + ops.getConnectionsPerHost());
    props.setProperty("connectTimeout", "" + ops.getConnectTimeout());
    props.setProperty("heartbeatConnectTimeout", "" + ops.getHeartbeatConnectTimeout());
    props.setProperty("heartbeatFrequency", "" + ops.getHeartbeatFrequency());
    props.setProperty("heartbeatSocketTimeout", "" + ops.getHeartbeatSocketTimeout());
    props.setProperty("localThreshold", "" + ops.getLocalThreshold());
    props.setProperty("maxConnectionIdleTime", "" + ops.getMaxConnectionIdleTime());
    props.setProperty("maxConnectionLifeTime", "" + ops.getMaxConnectionLifeTime());
    props.setProperty("maxWaitTime", "" + ops.getMaxWaitTime());
    props.setProperty("minConnectionsPerHost", "" + ops.getMinConnectionsPerHost());
    props.setProperty("minHeartbeatFrequency", "" + ops.getMinHeartbeatFrequency());
    props.setProperty("serverSelectionTimeout", "" + ops.getServerSelectionTimeout());
    props.setProperty("socketTimeout", "" + ops.getSocketTimeout());
    return props;
}