public enum ReentryInhibition extends java.lang.Enum<ReentryInhibition>
ClassTransaction
and MethodTransaction
prevent the creation of nested transaction with the same name. More restrictive strategies can be configured by
setting ClassTransaction.reentryInhibition()
or MethodTransaction.reentryInhibition()
to something
other than NAME
.
The reentry inhibition only applies to the transactions that would be directly nested. If a nested transaction is allowed, its own reentry inhibition setting will be used for the next nesting level.
Enum Constant and Description |
---|
ALL
Prevent all further nested transactions.
|
ANNOTATION
Prevent directly nested transactions defined by the same annotation.
|
DEV_OPS
Prevent all directly nested DevOps transactions.
|
GROUP
Prevent directly nested transactions with the same group name.
|
NAME
Prevent directly nested transactions with the same name.
|
Modifier and Type | Method and Description |
---|---|
static ReentryInhibition |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static ReentryInhibition[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final ReentryInhibition NAME
A simple example is the recursive invocation of the same method where you might not want to see nested transactions with the same name in the call tree.
As another example, a ClassTransaction
with
ClassTransaction.inheritance()
set to Inheritance.Mode.WITH_SUPERCLASS_NAME
will instrument a method and all its overriding methods in derived classes. After a method call into a
derived class has started a transaction, a super() call in that method would create another
transaction of the same name. This reentry inhibition mode prevents the creation of that nested transaction.
This is the default setting for ClassTransaction.reentryInhibition()
.
public static final ReentryInhibition ANNOTATION
This prevents nested transactions for recursive calls even they have a different name.
As another example, a ClassTransaction
instruments all public methods in a class.
When public method A has started a transaction and calls method B, no nested transaction is created even if
it would have a different name.
This is the default setting for MethodTransaction.reentryInhibition()
.
public static final ReentryInhibition GROUP
A group name is specified with ClassTransaction.group()
or MethodTransaction.group()
.
When a transaction with a particular group name is is progress, no nested transactions with the same group
name will be created. If you have multiple entry points that may call each other, but you are not interested in
resolving the internal structure, use this reentry inhibition mode.
public static final ReentryInhibition DEV_OPS
DevOps transactions are transactions created through this API, i.e. via
ClassTransaction
or MethodTransaction
.
Note that other transactions types that can be configured in the
perfino UI, like POJO or EJB transactions, can still nest with DevOps transactions.
public static final ReentryInhibition ALL
public static ReentryInhibition[] values()
for (ReentryInhibition c : ReentryInhibition.values()) System.out.println(c);
public static ReentryInhibition valueOf(java.lang.String name)
name
- the name of the enum constant to be returned.java.lang.IllegalArgumentException
- if this enum type has no constant
with the specified namejava.lang.NullPointerException
- if the argument is null