Package com.mongodb.client
Interface TransactionBody<T>
-
- Type Parameters:
T
- the return type
public interface TransactionBody<T>
A functional interface representing the body of a transaction. Implementations of this interface should be idempotent in order to support transaction retry logic.- Since:
- 3.10
- See Also:
ClientSession.withTransaction(TransactionBody)
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
execute()
Execute the body of the transaction.
-
-
-
Method Detail
-
execute
T execute()
Execute the body of the transaction.- Returns:
- the result of the transaction body
-
-