Example usage for org.springframework.transaction.reactive TransactionSynchronizationUtils invokeAfterCommit

List of usage examples for org.springframework.transaction.reactive TransactionSynchronizationUtils invokeAfterCommit

Introduction

In this page you can find the example usage for org.springframework.transaction.reactive TransactionSynchronizationUtils invokeAfterCommit.

Prototype

public static Mono<Void> invokeAfterCommit(Collection<TransactionSynchronization> synchronizations) 

Source Link

Document

Actually invoke the afterCommit methods of the given Spring TransactionSynchronization objects.

Usage

From source file:org.springframework.transaction.reactive.AbstractReactiveTransactionManager.java

/**
 * Trigger {@code afterCommit} callbacks.
 * @param synchronizationManager the synchronization manager bound to the current transaction
 * @param status object representing the transaction
 *//*w w w.j  a v a2  s . c  om*/
private Mono<Void> triggerAfterCommit(TransactionSynchronizationManager synchronizationManager,
        GenericReactiveTransaction status) {

    if (status.isNewSynchronization()) {
        if (status.isDebug()) {
            logger.trace("Triggering afterCommit synchronization");
        }
        return TransactionSynchronizationUtils.invokeAfterCommit(synchronizationManager.getSynchronizations());
    }

    return Mono.empty();
}