public enum SurroundingTransactionDetectorMethodInterceptor extends Enum<SurroundingTransactionDetectorMethodInterceptor> implements MethodInterceptor
MethodInterceptor detecting whether a transaction is already running and exposing that fact via
isSurroundingTransactionActive(). Useful in case subsequent interceptors might create transactions
themselves but downstream components have to find out whether there was one running before the call entered the
proxy.| Enum Constant and Description |
|---|
INSTANCE |
| Modifier and Type | Method and Description |
|---|---|
Object |
invoke(MethodInvocation invocation) |
boolean |
isSurroundingTransactionActive()
Returns whether a transaction was active before the method call entered the repository proxy.
|
static SurroundingTransactionDetectorMethodInterceptor |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static SurroundingTransactionDetectorMethodInterceptor[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final SurroundingTransactionDetectorMethodInterceptor INSTANCE
public static SurroundingTransactionDetectorMethodInterceptor[] values()
for (SurroundingTransactionDetectorMethodInterceptor c : SurroundingTransactionDetectorMethodInterceptor.values()) System.out.println(c);
public static SurroundingTransactionDetectorMethodInterceptor valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic boolean isSurroundingTransactionActive()
@Nullable public Object invoke(MethodInvocation invocation) throws Throwable
invoke in interface MethodInterceptorThrowableCopyright © 2011–2021 Pivotal Software, Inc.. All rights reserved.