Class CouchbaseCallbackTransactionManager
java.lang.Object
org.springframework.data.couchbase.transaction.CouchbaseCallbackTransactionManager
- All Implemented Interfaces:
PlatformTransactionManager
,CallbackPreferringPlatformTransactionManager
,TransactionManager
public class CouchbaseCallbackTransactionManager
extends Object
implements CallbackPreferringPlatformTransactionManager
The Couchbase transaction manager, providing support for @Transactional methods.
- Author:
- Graham Pople
-
Constructor Summary
ConstructorDescriptionCouchbaseCallbackTransactionManager
(CouchbaseClientFactory couchbaseClientFactory) CouchbaseCallbackTransactionManager
(CouchbaseClientFactory couchbaseClientFactory, com.couchbase.client.java.transactions.config.TransactionOptions options) This override is for users manually creating a CouchbaseCallbackTransactionManager, and allows the TransactionOptions to be overridden. -
Method Summary
Modifier and TypeMethodDescriptionvoid
commit
(TransactionStatus ignored) <T> T
execute
(TransactionDefinition definition, TransactionCallback<T> callback) getTransaction
(TransactionDefinition definition) void
rollback
(TransactionStatus ignored)
-
Constructor Details
-
CouchbaseCallbackTransactionManager
-
CouchbaseCallbackTransactionManager
public CouchbaseCallbackTransactionManager(CouchbaseClientFactory couchbaseClientFactory, @Nullable com.couchbase.client.java.transactions.config.TransactionOptions options) This override is for users manually creating a CouchbaseCallbackTransactionManager, and allows the TransactionOptions to be overridden.
-
-
Method Details
-
execute
public <T> T execute(TransactionDefinition definition, TransactionCallback<T> callback) throws TransactionException - Specified by:
execute
in interfaceCallbackPreferringPlatformTransactionManager
- Throws:
TransactionException
-
getTransaction
public TransactionStatus getTransaction(@Nullable TransactionDefinition definition) throws TransactionException - Specified by:
getTransaction
in interfacePlatformTransactionManager
- Throws:
TransactionException
-
commit
- Specified by:
commit
in interfacePlatformTransactionManager
- Throws:
TransactionException
-
rollback
- Specified by:
rollback
in interfacePlatformTransactionManager
- Throws:
TransactionException
-