Java com.mongodb MongoClientOptions fields, constructors, methods, implement or subclass

Example usage for Java com.mongodb MongoClientOptions fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for com.mongodb MongoClientOptions.

The text is from its open source code.

Method

Builderbuilder()
Creates a builder instance.
Builderbuilder(final MongoClientOptions options)
Creates a builder instance.
intgetConnectionsPerHost()

The maximum number of connections allowed per host for this MongoClient instance.

intgetConnectTimeout()

The connection timeout in milliseconds.

DBDecoderFactorygetDbDecoderFactory()
Override the decoder factory.
DBEncoderFactorygetDbEncoderFactory()
Override the encoder factory.
StringgetDescription()

Gets the description for this MongoClient, which is used in various places like logging and JMX.

Default is null.

intgetHeartbeatConnectTimeout()

Gets the connect timeout for connections used for the cluster heartbeat.

Default is 20,000 milliseconds.

intgetHeartbeatFrequency()
Gets the heartbeat frequency.
intgetHeartbeatSocketTimeout()
Gets the socket timeout for connections used for the cluster heartbeat.
intgetLocalThreshold()

Gets the local threshold.

intgetMaxConnectionIdleTime()
The maximum idle time of a pooled connection.
intgetMaxConnectionLifeTime()
The maximum life time of a pooled connection.
intgetMaxWaitTime()

The maximum wait time in milliseconds that a thread may wait for a connection to become available.

Default is 120,000 milliseconds.

intgetMinConnectionsPerHost()

The minimum number of connections per host for this MongoClient instance.

intgetMinHeartbeatFrequency()
Gets the minimum heartbeat frequency.
ReadPreferencegetReadPreference()

The read preference to use for queries, map-reduce, aggregation, and count.

Default is ReadPreference.primary() .

StringgetRequiredReplicaSetName()

Gets the required replica set name.

intgetServerSelectionTimeout()

Gets the server selection timeout in milliseconds, which defines how long the driver will wait for server selection to succeed before throwing an exception.

Default is 30,000 milliseconds.

SocketFactorygetSocketFactory()

The socket factory for creating sockets to the mongo server.

Default is SocketFactory.getDefault()

intgetSocketTimeout()

The socket timeout in milliseconds.

intgetThreadsAllowedToBlockForConnectionMultiplier()

This multiplier, multiplied with the connectionsPerHost setting, gives the maximum number of threads that may be waiting for a connection to become available from the pool.

WriteConcerngetWriteConcern()

The write concern to use.

Default is WriteConcern.ACKNOWLEDGED .

booleanisAlwaysUseMBeans()

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

booleanisCursorFinalizerEnabled()

Gets whether there is a a finalize method created that cleans up instances of DBCursor that the client does not close.

booleanisSocketKeepAlive()

This flag controls the socket keep-alive feature that keeps a connection alive through firewalls java.net.Socket#setKeepAlive(boolean)

Default is true .

StringtoString()