List of usage examples for com.mongodb MongoClientOptions getDescription
@Deprecated
public String getDescription()
Gets the description for this MongoClient, which is used in various places like logging and JMX.
Default is null.
From source file:com.bnrc.sdn.properties.MongoProperties.java
License:Apache License
private Builder builder(MongoClientOptions options) { Builder builder = MongoClientOptions.builder(); if (options != null) { builder.alwaysUseMBeans(options.isAlwaysUseMBeans()); builder.connectionsPerHost(options.getConnectionsPerHost()); builder.connectTimeout(options.getConnectTimeout()); builder.cursorFinalizerEnabled(options.isCursorFinalizerEnabled()); builder.dbDecoderFactory(options.getDbDecoderFactory()); builder.dbEncoderFactory(options.getDbEncoderFactory()); builder.description(options.getDescription()); builder.maxWaitTime(options.getMaxWaitTime()); builder.readPreference(options.getReadPreference()); builder.socketFactory(options.getSocketFactory()); builder.socketKeepAlive(options.isSocketKeepAlive()); builder.socketTimeout(options.getSocketTimeout()); builder.threadsAllowedToBlockForConnectionMultiplier( options.getThreadsAllowedToBlockForConnectionMultiplier()); builder.writeConcern(options.getWriteConcern()); }/* w w w .j ava2 s . c o m*/ return builder; }
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; }