Top Description Inners Fields Constructors Methods
org.springframework.transaction.reactive

pack-priv abstract Class TransactionSynchronizationUtils

extends Object
Class Inheritance
Imports
java.util.Collection, org.apache.commons.logging.Log, .LogFactory, reactor.core.publisher.Flux, .Mono, org.springframework.aop.scope.ScopedObject, org.springframework.core.InfrastructureProxy, org.springframework.util.Assert, .ClassUtils

Utility methods for triggering specific TransactionSynchronization callback methods on all currently registered synchronizations.
Authors
Mark Paluch, Juergen Hoeller
Since
5.2
See Also
TransactionSynchronization, TransactionSynchronizationManager#getSynchronizations()

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
TransactionSynchronizationUtils.ScopedProxyUnwrapper

Inner class to avoid hard-coded dependency on AOP module.

Field Summary

Modifier and TypeField and Description
private static final boolean
private static final Log

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public static Mono<Void>
invokeAfterCommit(Collection<TransactionSynchronization>
a List of TransactionSynchronization objects
synchronizations
)

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

public static Mono<Void>
invokeAfterCompletion(Collection<TransactionSynchronization>
a List of TransactionSynchronization objects
synchronizations
,
int
the completion status according to the constants in the TransactionSynchronization interface
completionStatus
)

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

public static Mono<Void>
triggerBeforeCommit(Collection<TransactionSynchronization>
a List of TransactionSynchronization objects
synchronizations
,
boolean readOnly)

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

public static Mono<Void>
triggerBeforeCompletion(Collection<TransactionSynchronization>
a List of TransactionSynchronization objects
synchronizations
)

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

pack-priv static Object
unwrapResourceIfNecessary(Object resource)

Unwrap the given resource handle if necessary; otherwise return the given handle as-is.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

aopAvailableback to summary
private static final boolean aopAvailable
loggerback to summary
private static final Log logger

Constructor Detail

TransactionSynchronizationUtilsback to summary
pack-priv TransactionSynchronizationUtils()

Method Detail

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

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

Parameters
synchronizations:Collection<TransactionSynchronization>

a List of TransactionSynchronization objects

See Also
TransactionSynchronization#afterCommit()
invokeAfterCompletionback to summary
public static Mono<Void> invokeAfterCompletion(Collection<TransactionSynchronization> synchronizations, int completionStatus)

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

Parameters
synchronizations:Collection<TransactionSynchronization>

a List of TransactionSynchronization objects

completionStatus:int

the completion status according to the constants in the TransactionSynchronization interface

See Also
TransactionSynchronization#afterCompletion(int), TransactionSynchronization#STATUS_COMMITTED, TransactionSynchronization#STATUS_ROLLED_BACK, TransactionSynchronization#STATUS_UNKNOWN
triggerBeforeCommitback to summary
public static Mono<Void> triggerBeforeCommit(Collection<TransactionSynchronization> synchronizations, boolean readOnly)

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

Parameters
synchronizations:Collection<TransactionSynchronization>

a List of TransactionSynchronization objects

See Also
TransactionSynchronization#beforeCommit(boolean)
triggerBeforeCompletionback to summary
public static Mono<Void> triggerBeforeCompletion(Collection<TransactionSynchronization> synchronizations)

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

Parameters
synchronizations:Collection<TransactionSynchronization>

a List of TransactionSynchronization objects

See Also
TransactionSynchronization#beforeCompletion()
unwrapResourceIfNecessaryback to summary
pack-priv static Object unwrapResourceIfNecessary(Object resource)

Unwrap the given resource handle if necessary; otherwise return the given handle as-is.

See Also
InfrastructureProxy#getWrappedObject()
org.springframework.transaction.reactive back to summary

private Class TransactionSynchronizationUtils.ScopedProxyUnwrapper

extends Object
Class Inheritance
  • java.lang.Object
  • org.springframework.transaction.reactive.TransactionSynchronizationUtils.ScopedProxyUnwrapper

Inner class to avoid hard-coded dependency on AOP module.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public static Object
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

ScopedProxyUnwrapperback to summary
private ScopedProxyUnwrapper()

Method Detail

unwrapIfNecessaryback to summary
public static Object unwrapIfNecessary(Object resource)