public class ReactiveMongoClientFactoryBean extends AbstractFactoryBean<com.mongodb.reactivestreams.client.MongoClient> implements PersistenceExceptionTranslator
MongoClient.loggerOBJECT_TYPE_ATTRIBUTE| Constructor and Description |
|---|
ReactiveMongoClientFactoryBean() |
| Modifier and Type | Method and Description |
|---|---|
protected com.mongodb.reactivestreams.client.MongoClient |
createInstance() |
protected void |
destroyInstance(com.mongodb.reactivestreams.client.MongoClient instance) |
Class<?> |
getObjectType() |
void |
setConnectionString(String connectionString)
Configures the connection string.
|
void |
setExceptionTranslator(PersistenceExceptionTranslator exceptionTranslator)
Configures the
PersistenceExceptionTranslator to use. |
void |
setHost(String host)
Configures the host to connect to.
|
void |
setMongoClientSettings(com.mongodb.MongoClientSettings mongoClientSettings)
Configures the mongo client settings.
|
void |
setPort(int port)
Configures the port to connect to.
|
DataAccessException |
translateExceptionIfPossible(RuntimeException ex) |
afterPropertiesSet, destroy, getBeanFactory, getBeanTypeConverter, getEarlySingletonInterfaces, getObject, isSingleton, setBeanClassLoader, setBeanFactory, setSingletonpublic void setHost(@Nullable String host)
host - public void setPort(int port)
port - public void setConnectionString(@Nullable String connectionString)
connectionString - public void setMongoClientSettings(@Nullable com.mongodb.MongoClientSettings mongoClientSettings)
mongoClientSettings - public void setExceptionTranslator(@Nullable PersistenceExceptionTranslator exceptionTranslator)
PersistenceExceptionTranslator to use.exceptionTranslator - public Class<?> getObjectType()
getObjectType in interface FactoryBean<com.mongodb.reactivestreams.client.MongoClient>getObjectType in class AbstractFactoryBean<com.mongodb.reactivestreams.client.MongoClient>protected com.mongodb.reactivestreams.client.MongoClient createInstance()
throws Exception
createInstance in class AbstractFactoryBean<com.mongodb.reactivestreams.client.MongoClient>Exceptionprotected void destroyInstance(@Nullable com.mongodb.reactivestreams.client.MongoClient instance) throws Exception
destroyInstance in class AbstractFactoryBean<com.mongodb.reactivestreams.client.MongoClient>Exceptionpublic DataAccessException translateExceptionIfPossible(RuntimeException ex)
translateExceptionIfPossible in interface PersistenceExceptionTranslatorCopyright © 2011–2022 Pivotal Software, Inc.. All rights reserved.