Class ReactiveFirestoreTransactionManager
java.lang.Object
org.springframework.transaction.reactive.AbstractReactiveTransactionManager
com.google.cloud.spring.data.firestore.transaction.ReactiveFirestoreTransactionManager
- All Implemented Interfaces:
Serializable
,org.springframework.transaction.ReactiveTransactionManager
,org.springframework.transaction.TransactionManager
public class ReactiveFirestoreTransactionManager
extends org.springframework.transaction.reactive.AbstractReactiveTransactionManager
Firestore-specific implementation of
ReactiveTransactionManager
.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.springframework.transaction.reactive.AbstractReactiveTransactionManager
org.springframework.transaction.reactive.AbstractReactiveTransactionManager.SuspendedResourcesHolder
-
Field Summary
Fields inherited from class org.springframework.transaction.reactive.AbstractReactiveTransactionManager
logger
-
Constructor Summary
ConstructorDescriptionReactiveFirestoreTransactionManager
(com.google.firestore.v1.FirestoreGrpc.FirestoreStub firestore, String parent, FirestoreClassMapper classMapper) Constructor for ReactiveFirestoreTransactionManager. -
Method Summary
Modifier and TypeMethodDescriptionprotected reactor.core.publisher.Mono<Void>
doBegin
(org.springframework.transaction.reactive.TransactionSynchronizationManager synchronizationManager, Object transactionObject, org.springframework.transaction.TransactionDefinition transactionDefinition) protected reactor.core.publisher.Mono<Void>
doCommit
(org.springframework.transaction.reactive.TransactionSynchronizationManager transactionSynchronizationManager, org.springframework.transaction.reactive.GenericReactiveTransaction genericReactiveTransaction) protected Object
doGetTransaction
(org.springframework.transaction.reactive.TransactionSynchronizationManager synchronizationManager) protected reactor.core.publisher.Mono<Void>
doRollback
(org.springframework.transaction.reactive.TransactionSynchronizationManager transactionSynchronizationManager, org.springframework.transaction.reactive.GenericReactiveTransaction genericReactiveTransaction) Methods inherited from class org.springframework.transaction.reactive.AbstractReactiveTransactionManager
commit, doCleanupAfterCompletion, doResume, doSetRollbackOnly, doSuspend, getReactiveTransaction, isExistingTransaction, prepareForCommit, registerAfterCompletionWithExistingTransaction, rollback
-
Constructor Details
-
ReactiveFirestoreTransactionManager
public ReactiveFirestoreTransactionManager(com.google.firestore.v1.FirestoreGrpc.FirestoreStub firestore, String parent, FirestoreClassMapper classMapper) Constructor for ReactiveFirestoreTransactionManager.- Parameters:
firestore
- Firestore gRPC stubparent
- the parent resource. For example: projects/{project_id}/databases/{database_id}/documents orclassMapper
- Firestore class mapper
-
-
Method Details
-
doGetTransaction
protected Object doGetTransaction(org.springframework.transaction.reactive.TransactionSynchronizationManager synchronizationManager) throws org.springframework.transaction.TransactionException - Specified by:
doGetTransaction
in classorg.springframework.transaction.reactive.AbstractReactiveTransactionManager
- Throws:
org.springframework.transaction.TransactionException
-
doBegin
protected reactor.core.publisher.Mono<Void> doBegin(org.springframework.transaction.reactive.TransactionSynchronizationManager synchronizationManager, Object transactionObject, org.springframework.transaction.TransactionDefinition transactionDefinition) throws org.springframework.transaction.TransactionException - Specified by:
doBegin
in classorg.springframework.transaction.reactive.AbstractReactiveTransactionManager
- Throws:
org.springframework.transaction.TransactionException
-
doCommit
protected reactor.core.publisher.Mono<Void> doCommit(org.springframework.transaction.reactive.TransactionSynchronizationManager transactionSynchronizationManager, org.springframework.transaction.reactive.GenericReactiveTransaction genericReactiveTransaction) throws org.springframework.transaction.TransactionException - Specified by:
doCommit
in classorg.springframework.transaction.reactive.AbstractReactiveTransactionManager
- Throws:
org.springframework.transaction.TransactionException
-
doRollback
protected reactor.core.publisher.Mono<Void> doRollback(org.springframework.transaction.reactive.TransactionSynchronizationManager transactionSynchronizationManager, org.springframework.transaction.reactive.GenericReactiveTransaction genericReactiveTransaction) throws org.springframework.transaction.TransactionException - Specified by:
doRollback
in classorg.springframework.transaction.reactive.AbstractReactiveTransactionManager
- Throws:
org.springframework.transaction.TransactionException
-