|
Spring Data MongoDB - Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.springframework.data.mongodb.core.MongoOptionsFactoryBean
public class MongoOptionsFactoryBean
A factory bean for construction of a MongoOptions instance.
| Constructor Summary | |
|---|---|
MongoOptionsFactoryBean()
|
|
| Method Summary | |
|---|---|
void |
afterPropertiesSet()
|
com.mongodb.MongoOptions |
getObject()
|
Class<?> |
getObjectType()
|
boolean |
isSingleton()
|
void |
setAutoConnectRetry(boolean autoConnectRetry)
Configures whether or not the system retries automatically on a failed connect. |
void |
setConnectionsPerHost(int connectionsPerHost)
Configures the maximum number of connections allowed per host until we will block. |
void |
setConnectTimeout(int connectTimeout)
Configures the connect timeout in milliseconds. |
void |
setMaxAutoConnectRetryTime(long maxAutoConnectRetryTime)
Configures 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)
Configures whether or not to have socket keep alive turned on (SO_KEEPALIVE). |
void |
setSocketTimeout(int socketTimeout)
Configures the socket timeout. |
void |
setSsl(boolean ssl)
Specifies if the driver should use an SSL connection to Mongo. |
void |
setSslSocketFactory(SSLSocketFactory sslSocketFactory)
Specifies the SSLSocketFactory to use for creating SSL connections to Mongo. |
void |
setThreadsAllowedToBlockForConnectionMultiplier(int threadsAllowedToBlockForConnectionMultiplier)
A multiplier for connectionsPerHost for # of threads that can block a connection. |
void |
setWriteFsync(boolean writeFsync)
Configures 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)
Configures the timeout for write operations in milliseconds. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MongoOptionsFactoryBean()
| Method Detail |
|---|
public void setConnectionsPerHost(int connectionsPerHost)
connectionsPerHost - public void setThreadsAllowedToBlockForConnectionMultiplier(int threadsAllowedToBlockForConnectionMultiplier)
threadsAllowedToBlockForConnectionMultiplier - public void setMaxWaitTime(int maxWaitTime)
maxWaitTime - public void setConnectTimeout(int connectTimeout)
connectTimeout - public void setSocketTimeout(int socketTimeout)
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 - public void setWriteFsync(boolean writeFsync)
writeFsync - to fsync on write (true), otherwise false.public void setAutoConnectRetry(boolean autoConnectRetry)
public void setMaxAutoConnectRetryTime(long maxAutoConnectRetryTime)
autoConnectRetry is on.
maxAutoConnectRetryTime - the maxAutoConnectRetryTime to setpublic void setSlaveOk(boolean slaveOk)
slaveOk - true if the driver should read from secondaries or slaves.public void setSsl(boolean ssl)
SSLSocketFactory.getDefault() will be used. See setSslSocketFactory(SSLSocketFactory) if you want
to configure a custom factory.
ssl - true if the driver should use an SSL connection.setSslSocketFactory(SSLSocketFactory)public void setSslSocketFactory(SSLSocketFactory sslSocketFactory)
SSLSocketFactory to use for creating SSL connections to Mongo. Defaults to
SSLSocketFactory.getDefault(). Implicitly activates setSsl(boolean) if a non-null value
is given.
sslSocketFactory - the sslSocketFactory to use.setSsl(boolean)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>
|
Spring Data MongoDB - Core | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||