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.

@FunctionalInterface public interface MongoSessionProvider
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 Type
    Method
    Description
    com.mongodb.client.ClientSession
    getSession(com.mongodb.ClientSessionOptions options)
    Obtain a ClientSession with with given options.
  • Method Details

    • getSession

      com.mongodb.client.ClientSession getSession(com.mongodb.ClientSessionOptions options)
      Obtain a ClientSession with with given options.
      Parameters:
      options - must not be null.
      Returns:
      never null.
      Throws:
      org.springframework.dao.DataAccessException