Class MongoTransactionManager.MongoTransactionObject

java.lang.Object
org.springframework.data.mongodb.MongoTransactionManager.MongoTransactionObject
All Implemented Interfaces:
Flushable, SmartTransactionObject
Enclosing class:
MongoTransactionManager

protected static class MongoTransactionManager.MongoTransactionObject extends Object implements SmartTransactionObject
MongoDB specific transaction object, representing a MongoResourceHolder. Used as transaction object by MongoTransactionManager.
Since:
2.1
Author:
Christoph Strobl, Mark Paluch
See Also:
  • MongoResourceHolder
  • Method Details

    • commitTransaction

      public void commitTransaction()
      Commit the transaction.
    • abortTransaction

      public void abortTransaction()
      Rollback (abort) the transaction.
    • getSession

      @Nullable public com.mongodb.client.ClientSession getSession()
    • isRollbackOnly

      public boolean isRollbackOnly()
      Specified by:
      isRollbackOnly in interface SmartTransactionObject
    • flush

      public void flush()
      Specified by:
      flush in interface Flushable
      Specified by:
      flush in interface SmartTransactionObject