Package | Description |
---|---|
com.mongodb |
Modifier and Type | Method and Description |
---|---|
MongoClientOptions.Builder |
MongoClientOptions.Builder.addClusterListener(com.mongodb.event.ClusterListener clusterListener)
Adds the given cluster listener.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.addCommandListener(com.mongodb.event.CommandListener commandListener)
Adds the given command listener.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.addServerListener(com.mongodb.event.ServerListener serverListener)
Adds the given server listener.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.addServerMonitorListener(com.mongodb.event.ServerMonitorListener serverMonitorListener)
Adds the given server monitro listener.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.alwaysUseMBeans(boolean alwaysUseMBeans)
Sets whether JMX beans registered by the driver should always be MBeans, regardless of whether the VM is Java 6 or greater.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.applicationName(String applicationName)
Sets the logical name of the application using this MongoClient.
|
static MongoClientOptions.Builder |
MongoClientOptions.builder()
Creates a builder instance.
|
static MongoClientOptions.Builder |
MongoClientOptions.builder(MongoClientOptions options)
Creates a builder instance.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.codecRegistry(org.bson.codecs.configuration.CodecRegistry codecRegistry)
Sets the codec registry
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.connectionsPerHost(int connectionsPerHost)
Sets the maximum number of connections per host.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.connectTimeout(int connectTimeout)
Sets the connection timeout.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.cursorFinalizerEnabled(boolean cursorFinalizerEnabled)
Sets whether cursor finalizers are enabled.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.dbDecoderFactory(DBDecoderFactory dbDecoderFactory)
Sets the decoder factory.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.dbEncoderFactory(DBEncoderFactory dbEncoderFactory)
Sets the encoder factory.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.description(String description)
Sets the description.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.heartbeatConnectTimeout(int connectTimeout)
Sets the connect timeout for connections used for the cluster heartbeat.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.heartbeatFrequency(int heartbeatFrequency)
Sets the heartbeat frequency.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.heartbeatSocketTimeout(int socketTimeout)
Sets the socket timeout for connections used for the cluster heartbeat.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.legacyDefaults()
Sets defaults to be what they are in
MongoOptions . |
MongoClientOptions.Builder |
MongoClientOptions.Builder.localThreshold(int localThreshold)
Sets the local threshold.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.maxConnectionIdleTime(int maxConnectionIdleTime)
Sets the maximum idle time for a pooled connection.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.maxConnectionLifeTime(int maxConnectionLifeTime)
Sets the maximum life time for a pooled connection.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.maxWaitTime(int maxWaitTime)
Sets the maximum time that a thread will block waiting for a connection.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.minConnectionsPerHost(int minConnectionsPerHost)
Sets the minimum number of connections per host.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.minHeartbeatFrequency(int minHeartbeatFrequency)
Sets the minimum heartbeat frequency.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.readConcern(com.mongodb.ReadConcern readConcern)
Sets the read concern.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.readPreference(com.mongodb.ReadPreference readPreference)
Sets the read preference.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.requiredReplicaSetName(String requiredReplicaSetName)
Sets the required replica set name for the cluster.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.serverSelectionTimeout(int serverSelectionTimeout)
Sets the server selection timeout in milliseconds, which defines how long the driver will wait for server selection to
succeed before throwing an exception.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.socketFactory(SocketFactory socketFactory)
Sets the socket factory.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.socketKeepAlive(boolean socketKeepAlive)
Sets whether socket keep alive is enabled.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.socketTimeout(int socketTimeout)
Sets the socket timeout.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.sslEnabled(boolean sslEnabled)
Sets whether to use SSL.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.sslInvalidHostNameAllowed(boolean sslInvalidHostNameAllowed)
Define whether invalid host names should be allowed.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.threadsAllowedToBlockForConnectionMultiplier(int threadsAllowedToBlockForConnectionMultiplier)
Sets the multiplier for number of threads allowed to block waiting for a connection.
|
MongoClientOptions.Builder |
MongoClientOptions.Builder.writeConcern(com.mongodb.WriteConcern writeConcern)
Sets the write concern.
|
Constructor and Description |
---|
MongoClientURI(String uri,
MongoClientOptions.Builder builder)
Creates a MongoURI from the given URI string, and MongoClientOptions.Builder.
|
Copyright © 2017. All rights reserved.