Example usage for com.mongodb MongoClientOptions isAlwaysUseMBeans

List of usage examples for com.mongodb MongoClientOptions isAlwaysUseMBeans

Introduction

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

Prototype

@Deprecated
public boolean isAlwaysUseMBeans() 

Source Link

Document

Gets whether JMX beans registered by the driver should always be MBeans, regardless of whether the VM is Java 6 or greater.

Usage

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());
    }/*from  w w w  .  j  a  v a 2s .com*/
    return builder;
}