public class MongoOptionsFactoryBean extends Object implements FactoryBean<com.mongodb.MongoOptions>, InitializingBean
| Modifier and Type | Field and Description |
|---|---|
boolean |
socketKeepAlive
This controls whether or not to have socket keep alive turned on (SO_KEEPALIVE).
|
| Constructor and Description |
|---|
MongoOptionsFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
com.mongodb.MongoOptions |
getObject() |
Class<?> |
getObjectType() |
boolean |
isSingleton() |
void |
setAutoConnectRetry(boolean autoConnectRetry)
this controls whether or not on a connect, the system retries automatically
|
void |
setConnectionsPerHost(int connectionsPerHost)
number of connections allowed per host will block if run out
|
void |
setConnectTimeout(int connectTimeout)
connect timeout in milliseconds. 0 is default and infinite
|
void |
setMaxAutoConnectRetryTime(long maxAutoConnectRetryTime)
The maximum amount of time in millisecons to spend retrying to open connection to the same server.
|
void |
setMaxWaitTime(int maxWaitTime)
max wait time of a blocking thread for a connection
|
void |
setSlaveOk(boolean slaveOk)
Specifies if the driver is allowed to read from secondaries or slaves.
|
void |
setSocketKeepAlive(boolean socketKeepAlive)
This controls whether or not to have socket keep alive
|
void |
setSocketTimeout(int socketTimeout)
socket timeout. 0 is default and infinite
|
void |
setThreadsAllowedToBlockForConnectionMultiplier(int threadsAllowedToBlockForConnectionMultiplier)
multiplier for connectionsPerHost for # of threads that can block if connectionsPerHost is 10, and
threadsAllowedToBlockForConnectionMultiplier is 5, then 50 threads can block more than that and an exception will
be throw
|
void |
setWriteFsync(boolean writeFsync)
This controls whether or not to fsync.
|
void |
setWriteNumber(int writeNumber)
This specifies the number of servers to wait for on the write operation, and exception raising behavior.
|
void |
setWriteTimeout(int writeTimeout)
This controls timeout for write operations in milliseconds.
|
public boolean socketKeepAlive
public void setConnectionsPerHost(int connectionsPerHost)
public void setThreadsAllowedToBlockForConnectionMultiplier(int threadsAllowedToBlockForConnectionMultiplier)
public void setMaxWaitTime(int maxWaitTime)
public void setConnectTimeout(int connectTimeout)
public void setSocketTimeout(int socketTimeout)
public void setSocketKeepAlive(boolean socketKeepAlive)
socketKeepAlive - public void setWriteNumber(int writeNumber)
writeNumber - the number of servers to wait for on the write operation, and exception raising behavior.public void setWriteTimeout(int writeTimeout)
writeTimeout - Defaults to 0 (indefinite). Greater than zero is number of milliseconds to wait.public void setWriteFsync(boolean writeFsync)
writeFsync - to fsync on write (true), otherwise false.public void setAutoConnectRetry(boolean autoConnectRetry)
public void setMaxAutoConnectRetryTime(long maxAutoConnectRetryTime)
maxAutoConnectRetryTime - the maxAutoConnectRetryTime to setpublic void setSlaveOk(boolean slaveOk)
slaveOk - true if the driver should read from secondaries or slaves.public void afterPropertiesSet()
afterPropertiesSet in interface InitializingBeanpublic com.mongodb.MongoOptions getObject()
getObject in interface FactoryBean<com.mongodb.MongoOptions>public Class<?> getObjectType()
getObjectType in interface FactoryBean<com.mongodb.MongoOptions>public boolean isSingleton()
isSingleton in interface FactoryBean<com.mongodb.MongoOptions>Copyright © 2011-2013-2013 SpringSource. All Rights Reserved.