Spring Data Document

org.springframework.data.document.mongodb
Class MongoOptionsFactoryBean

java.lang.Object
  extended by org.springframework.data.document.mongodb.MongoOptionsFactoryBean
All Implemented Interfaces:
FactoryBean<MongoOptions>, InitializingBean

public class MongoOptionsFactoryBean
extends Object
implements FactoryBean<MongoOptions>, InitializingBean

A factory bean for consruction a MongoOptions instance

Author:
Graeme Rocher

Constructor Summary
MongoOptionsFactoryBean()
           
 
Method Summary
 void afterPropertiesSet()
           
 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 setMaxWaitTime(int maxWaitTime)
          max wait time of a blocking thread for a connection
 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
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MongoOptionsFactoryBean

public MongoOptionsFactoryBean()
Method Detail

setConnectionsPerHost

public void setConnectionsPerHost(int connectionsPerHost)
number of connections allowed per host will block if run out


setThreadsAllowedToBlockForConnectionMultiplier

public 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


setMaxWaitTime

public void setMaxWaitTime(int maxWaitTime)
max wait time of a blocking thread for a connection


setConnectTimeout

public void setConnectTimeout(int connectTimeout)
connect timeout in milliseconds. 0 is default and infinite


setSocketTimeout

public void setSocketTimeout(int socketTimeout)
socket timeout. 0 is default and infinite


setAutoConnectRetry

public void setAutoConnectRetry(boolean autoConnectRetry)
this controls whether or not on a connect, the system retries automatically


afterPropertiesSet

public void afterPropertiesSet()
Specified by:
afterPropertiesSet in interface InitializingBean

getObject

public MongoOptions getObject()
Specified by:
getObject in interface FactoryBean<MongoOptions>

getObjectType

public Class<?> getObjectType()
Specified by:
getObjectType in interface FactoryBean<MongoOptions>

isSingleton

public boolean isSingleton()
Specified by:
isSingleton in interface FactoryBean<MongoOptions>

Spring Data Document

Copyright © 2011. All Rights Reserved.