public class MongoClientOptionsFactoryBean extends AbstractFactoryBean<com.mongodb.MongoClientOptions>
MongoClientOptions instance.logger| Constructor and Description |
|---|
MongoClientOptionsFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
protected com.mongodb.MongoClientOptions |
createInstance() |
Class<?> |
getObjectType() |
void |
setConnectionsPerHost(int connectionsPerHost)
Set the number of connections allowed per host.
|
void |
setConnectTimeout(int connectTimeout)
Set the connect timeout in milliseconds. 0 is default and infinite.
|
void |
setDescription(String description)
Set the
MongoClient description. |
void |
setHeartbeatConnectTimeout(int heartbeatConnectTimeout)
Set the connect timeout for connections used for the cluster heartbeat.
|
void |
setHeartbeatFrequency(int heartbeatFrequency)
Set the frequency that the driver will attempt to determine the current state of each server in the cluster.
|
void |
setHeartbeatSocketTimeout(int heartbeatSocketTimeout)
Set the socket timeout for connections used for the cluster heartbeat.
|
void |
setMaxConnectionIdleTime(int maxConnectionIdleTime)
The maximum idle time for a pooled connection.
|
void |
setMaxConnectionLifeTime(int maxConnectionLifeTime)
Set the maximum life time for a pooled connection.
|
void |
setMaxWaitTime(int maxWaitTime)
Set the max wait time of a blocking thread for a connection.
|
void |
setMinConnectionsPerHost(int minConnectionsPerHost)
Set the minimum number of connections per host.
|
void |
setMinHeartbeatFrequency(int minHeartbeatFrequency)
In the event that the driver has to frequently re-check a server's availability, it will wait at least this long
since the previous check to avoid wasted effort.
|
void |
setReadPreference(com.mongodb.ReadPreference readPreference)
Set the
ReadPreference. |
void |
setRequiredReplicaSetName(String requiredReplicaSetName)
Configures the name of the replica set.
|
void |
setServerSelectionTimeout(int serverSelectionTimeout)
Set the server selection timeout in msec for a 3.x MongoDB Java driver.
|
void |
setSocketFactory(SocketFactory socketFactory) |
void |
setSocketKeepAlive(boolean socketKeepAlive)
Set the keep alive flag, controls whether or not to have socket keep alive timeout.
|
void |
setSocketTimeout(int socketTimeout)
Set the socket timeout. 0 is default and infinite.
|
void |
setSsl(boolean ssl)
This controls if the driver should us an SSL connection.
|
void |
setSslSocketFactory(SSLSocketFactory sslSocketFactory)
Set the
SSLSocketFactory to use for the SSL connection. |
void |
setThreadsAllowedToBlockForConnectionMultiplier(int threadsAllowedToBlockForConnectionMultiplier)
Set the multiplier for connectionsPerHost for # of threads that can block.
|
void |
setWriteConcern(com.mongodb.WriteConcern writeConcern)
Set the
WriteConcern that will be the default value used when asking the MongoDbFactory for a DB
object. |
afterPropertiesSet, destroy, destroyInstance, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingletonpublic void setDescription(@Nullable String description)
MongoClient description.description - public void setMinConnectionsPerHost(int minConnectionsPerHost)
minConnectionsPerHost - public void setConnectionsPerHost(int connectionsPerHost)
MONGO.POOLSIZE can overrideconnectionsPerHost - public void setThreadsAllowedToBlockForConnectionMultiplier(int threadsAllowedToBlockForConnectionMultiplier)
threadsAllowedToBlockForConnectionMultiplier - public void setMaxWaitTime(int maxWaitTime)
maxWaitTime - public void setMaxConnectionIdleTime(int maxConnectionIdleTime)
maxConnectionIdleTime - public void setMaxConnectionLifeTime(int maxConnectionLifeTime)
maxConnectionLifeTime - public void setConnectTimeout(int connectTimeout)
connectTimeout - public void setSocketTimeout(int socketTimeout)
socketTimeout - public void setSocketKeepAlive(boolean socketKeepAlive)
socketKeepAlive - public void setReadPreference(@Nullable com.mongodb.ReadPreference readPreference)
ReadPreference.readPreference - public void setWriteConcern(@Nullable com.mongodb.WriteConcern writeConcern)
WriteConcern that will be the default value used when asking the MongoDbFactory for a DB
object.writeConcern - public void setSocketFactory(@Nullable SocketFactory socketFactory)
socketFactory - public void setHeartbeatFrequency(int heartbeatFrequency)
heartbeatFrequency - public void setMinHeartbeatFrequency(int minHeartbeatFrequency)
minHeartbeatFrequency - public void setHeartbeatConnectTimeout(int heartbeatConnectTimeout)
heartbeatConnectTimeout - public void setHeartbeatSocketTimeout(int heartbeatSocketTimeout)
heartbeatSocketTimeout - public void setRequiredReplicaSetName(String requiredReplicaSetName)
requiredReplicaSetName - public void setSsl(boolean ssl)
ssl - public void setSslSocketFactory(@Nullable SSLSocketFactory sslSocketFactory)
SSLSocketFactory to use for the SSL connection. If none is configured here,
SSLSocketFactory.getDefault() will be used.sslSocketFactory - public void setServerSelectionTimeout(int serverSelectionTimeout)
serverSelectionTimeout - in msec.protected com.mongodb.MongoClientOptions createInstance()
throws Exception
createInstance in class AbstractFactoryBean<com.mongodb.MongoClientOptions>Exceptionpublic Class<?> getObjectType()
getObjectType in interface FactoryBean<com.mongodb.MongoClientOptions>getObjectType in class AbstractFactoryBean<com.mongodb.MongoClientOptions>Copyright © 2011–2018 Pivotal Software, Inc.. All rights reserved.