Package org.springframework.data.mongodb
Interface MongoSessionProvider
- All Known Subinterfaces:
MongoDatabaseFactory
- All Known Implementing Classes:
MongoDatabaseFactorySupport
,SimpleMongoClientDatabaseFactory
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
A simple interface for obtaining a
ClientSession
to be consumed by
MongoOperations
and MongoDB native operations that support causal
consistency and transactions.- Since:
- 2.1
- Author:
- Christoph Strobl
-
Method Summary
Modifier and TypeMethodDescriptioncom.mongodb.client.ClientSession
getSession
(com.mongodb.ClientSessionOptions options) Obtain aClientSession
with with given options.
-
Method Details
-
getSession
com.mongodb.client.ClientSession getSession(com.mongodb.ClientSessionOptions options) Obtain aClientSession
with with given options.- Parameters:
options
- must not be null.- Returns:
- never null.
- Throws:
org.springframework.dao.DataAccessException
-