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

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

Introduction

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

Prototype

public static Mono<Void> triggerBeforeCommit(Collection<TransactionSynchronization> synchronizations,
        boolean readOnly) 

Source Link

Document

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

Usage

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

/**
 * Trigger {@code beforeCommit} callbacks.
 * @param synchronizationManager the synchronization manager bound to the current transaction
 * @param status object representing the transaction
 *///from ww w .j  av a 2 s . co  m
private Mono<Void> triggerBeforeCommit(TransactionSynchronizationManager synchronizationManager,
        GenericReactiveTransaction status) {

    if (status.isNewSynchronization()) {
        if (status.isDebug()) {
            logger.trace("Triggering beforeCommit synchronization");
        }
        return TransactionSynchronizationUtils.triggerBeforeCommit(synchronizationManager.getSynchronizations(),
                status.isReadOnly());
    }

    return Mono.empty();
}