Enum Class ReentryInhibition
- All Implemented Interfaces:
Serializable, Comparable<ReentryInhibition>, Constable
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.
-
Nested Class Summary
Nested classes/interfaces inherited from class Enum
Enum.EnumDesc<E> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionPrevent all further nested transactions.Prevent directly nested transactions defined by the same annotation.Prevent all directly nested Declared transactions.Prevent directly nested transactions with the same group name.Prevent directly nested transactions with the same name. -
Method Summary
Modifier and TypeMethodDescriptionstatic ReentryInhibitionReturns the enum constant of this class with the specified name.static ReentryInhibition[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
NAME
Prevent directly nested transactions with the same 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
ClassTransactionwithClassTransaction.inheritance()set toInheritance.Mode.WITH_SUPERCLASS_NAMEwill instrument a method and all its overriding methods in derived classes. After a method call into a derived class has started a transaction, asuper()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(). -
ANNOTATION
Prevent directly nested transactions defined by the same annotation.This prevents nested transactions for recursive calls even they have a different name.
As another example, a
ClassTransactioninstruments 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 has a different name.This is the default setting for
MethodTransaction.reentryInhibition(). -
GROUP
Prevent directly nested transactions with the same group name.A group name is specified with
ClassTransaction.group()orMethodTransaction.group(). When a transaction with a particular group name is in 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. -
DECLARED
Prevent all directly nested Declared transactions.Declared transactions are transactions created through this API via
ClassTransactionorMethodTransaction. Note that other transactions types that can be configured in the jvmguard UI, like Matched or Mapped transactions, can still nest with Declared transactions. -
ALL
Prevent all further nested transactions.
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-