public class MongoFactoryBean extends Object implements FactoryBean<com.mongodb.Mongo>, InitializingBean, DisposableBean, PersistenceExceptionTranslator
| Constructor and Description |
|---|
MongoFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterPropertiesSet() |
void |
destroy() |
com.mongodb.Mongo |
getObject() |
Class<? extends com.mongodb.Mongo> |
getObjectType() |
boolean |
isSingleton() |
void |
setExceptionTranslator(PersistenceExceptionTranslator exceptionTranslator) |
void |
setHost(String host) |
void |
setMongoOptions(com.mongodb.MongoOptions mongoOptions) |
void |
setPort(int port) |
void |
setReplicaPair(com.mongodb.ServerAddress[] replicaPair)
Deprecated.
use
setReplicaSetSeeds(ServerAddress[]) instead |
void |
setReplicaSetSeeds(com.mongodb.ServerAddress[] replicaSetSeeds) |
void |
setWriteConcern(com.mongodb.WriteConcern writeConcern)
Sets the
WriteConcern to be configured for the Mongo instance to be created. |
DataAccessException |
translateExceptionIfPossible(RuntimeException ex) |
public void setMongoOptions(com.mongodb.MongoOptions mongoOptions)
public void setReplicaSetSeeds(com.mongodb.ServerAddress[] replicaSetSeeds)
@Deprecated public void setReplicaPair(com.mongodb.ServerAddress[] replicaPair)
setReplicaSetSeeds(ServerAddress[]) insteadreplicaPair - public void setHost(String host)
public void setPort(int port)
public void setWriteConcern(com.mongodb.WriteConcern writeConcern)
WriteConcern to be configured for the Mongo instance to be created.writeConcern - public void setExceptionTranslator(PersistenceExceptionTranslator exceptionTranslator)
public com.mongodb.Mongo getObject()
throws Exception
getObject in interface FactoryBean<com.mongodb.Mongo>Exceptionpublic Class<? extends com.mongodb.Mongo> getObjectType()
getObjectType in interface FactoryBean<com.mongodb.Mongo>public boolean isSingleton()
isSingleton in interface FactoryBean<com.mongodb.Mongo>public DataAccessException translateExceptionIfPossible(RuntimeException ex)
translateExceptionIfPossible in interface PersistenceExceptionTranslatorpublic void afterPropertiesSet()
throws Exception
afterPropertiesSet in interface InitializingBeanExceptionpublic void destroy()
throws Exception
destroy in interface DisposableBeanExceptionCopyright © 2011-2014–2015 Pivotal Software, Inc.. All rights reserved.