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

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

Introduction

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

The text is from its open source code.

Subclass

com.mongodb.MongoOptions has subclasses.
Click this link to see all its subclasses.

Constructor

MongoOptions()
Creates a new default MongoOptions .
MongoOptions(final MongoClientOptions options)
Creates a new MongoOptions with the given options.

Method

intgetConnectionsPerHost()
Gets the maximum number of connections allowed per host for this Mongo instance.
voidsetConnectionsPerHost(final int connections)
Sets the maximum number of connections allowed per host for this Mongo instance.
voidsetConnectTimeout(final int timeoutMS)
Sets the connection timeout in milliseconds.
voidsetFsync(final boolean sync)
Sets the "fsync" value of the global WriteConcern.
voidsetMaxWaitTime(final int timeMS)
Sets the maximum wait time in milliseconds that a thread may wait for a connection to become available.
voidsetSocketFactory(final SocketFactory factory)
Sets the socket factory for creating sockets to mongod.
voidsetSocketKeepAlive(final boolean keepAlive)
Sets the flag that controls the socket keep alive feature that keeps a connection alive through firewalls java.net.Socket#setKeepAlive(boolean) Default is false.
voidsetSocketTimeout(final int timeoutMS)
Sets the socket timeout in milliseconds It is used for I/O socket read and write operations java.net.Socket#setSoTimeout(int) Default is 0 and means no timeout.
voidsetThreadsAllowedToBlockForConnectionMultiplier(final int threads)
Sets the multiplier which, when multiplied with the connectionsPerHost setting, gives the maximum number of threads that may be waiting for a connection to become available from the pool.
voidsetW(final int val)
Sets the "w" value, (number of writes), of the global WriteConcern.
voidsetWriteConcern(final WriteConcern writeConcern)
Sets the write concern.
voidsetWtimeout(final int timeoutMS)
Sets the "wtimeout" value of the global WriteConcern.