Package org.springframework.data.mongodb
Class MongoTransactionManager.MongoTransactionObject
java.lang.Object
org.springframework.data.mongodb.MongoTransactionManager.MongoTransactionObject
- All Implemented Interfaces:
Flushable
,org.springframework.transaction.support.SmartTransactionObject
- Enclosing class:
- MongoTransactionManager
protected static class MongoTransactionManager.MongoTransactionObject
extends Object
implements org.springframework.transaction.support.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 Summary
Modifier and TypeMethodDescriptionvoid
Rollback (abort) the transaction.void
Commit the transaction.void
flush()
com.mongodb.client.ClientSession
boolean
-
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 interfaceorg.springframework.transaction.support.SmartTransactionObject
-
flush
public void flush()
-