public interface ReactiveMongoDatabaseFactory extends CodecRegistryProvider
MongoDatabase instances.| Modifier and Type | Method and Description |
|---|---|
org.bson.codecs.configuration.CodecRegistry |
getCodecRegistry()
Get the underlying
CodecRegistry used by the reactive MongoDB Java driver. |
PersistenceExceptionTranslator |
getExceptionTranslator()
Exposes a shared
MongoExceptionTranslator. |
reactor.core.publisher.Mono<com.mongodb.reactivestreams.client.MongoDatabase> |
getMongoDatabase()
Creates a default
MongoDatabase instance. |
reactor.core.publisher.Mono<com.mongodb.reactivestreams.client.MongoDatabase> |
getMongoDatabase(String dbName)
Obtain a
MongoDatabase instance to access the database with the given name. |
reactor.core.publisher.Mono<com.mongodb.reactivestreams.client.ClientSession> |
getSession(com.mongodb.ClientSessionOptions options)
Obtain a
Mono emitting a ClientSession for given options. |
default boolean |
isTransactionActive()
Returns if the given
ReactiveMongoDatabaseFactory is bound to a
ClientSession that has an
active transaction. |
ReactiveMongoDatabaseFactory |
withSession(com.mongodb.reactivestreams.client.ClientSession session)
Obtain a
ClientSession bound instance of ReactiveMongoDatabaseFactory returning
MongoDatabase instances that are aware and bound to the given session. |
getCodecFor, hasCodecForreactor.core.publisher.Mono<com.mongodb.reactivestreams.client.MongoDatabase> getMongoDatabase()
throws DataAccessException
MongoDatabase instance.DataAccessExceptionreactor.core.publisher.Mono<com.mongodb.reactivestreams.client.MongoDatabase> getMongoDatabase(String dbName) throws DataAccessException
MongoDatabase instance to access the database with the given name.dbName - must not be null or empty.DataAccessExceptionPersistenceExceptionTranslator getExceptionTranslator()
MongoExceptionTranslator.org.bson.codecs.configuration.CodecRegistry getCodecRegistry()
CodecRegistry used by the reactive MongoDB Java driver.getCodecRegistry in interface CodecRegistryProviderreactor.core.publisher.Mono<com.mongodb.reactivestreams.client.ClientSession> getSession(com.mongodb.ClientSessionOptions options)
Mono emitting a ClientSession for given options.options - must not be null.ReactiveMongoDatabaseFactory withSession(com.mongodb.reactivestreams.client.ClientSession session)
ClientSession bound instance of ReactiveMongoDatabaseFactory returning
MongoDatabase instances that are aware and bound to the given session.session - must not be null.default boolean isTransactionActive()
ReactiveMongoDatabaseFactory is bound to a
ClientSession that has an
active transaction.Copyright © 2011–2023 Pivotal Software, Inc.. All rights reserved.