Annotation Interface MethodTransaction


@Target(METHOD) @Retention(CLASS) public @interface MethodTransaction
Create transactions for the annotated method. Any invocation of the annotated method will create a transaction with the specified naming.

Overridden methods in derived classes are not instrumented unless the inheritance() parameter is set accordingly. If you specify @MethodTransaction on an abstract method, you have to set inheritance() to something other than Mode.NONE, otherwise no method will be instrumented.

See the package overview for an overview of the perfino API.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Specify a group name for the perfino UI configuration.
    Specify how overridden methods in derived classes should be handled.
    Specify the name of the transactions that are created by the annotated method.
    Specify under what conditions this transaction should be created as a nested transaction.
  • Element Details

    • naming

      Part[] naming
      Specify the name of the transactions that are created by the annotated method. The name is expressed as a concatenation of name parts. See the documentation for Part for a detailed explanation.

      You can pass a single @Part or an array of parts with the syntax {@Part(...), @Part(...), @Part(...)}.

      Default:
      {@com.perfino.annotation.Part(value=CLASS, text="."), @com.perfino.annotation.Part(METHOD)}
    • group

      String group
      Specify a group name for the perfino UI configuration. To configure options in the perfino UI that apply to different DevOps transactions, set the group parameter for those transactions to a common string. For example, policies are usually the same for a number of transactions. By setting the group in the annotations, you can avoid multiple identical configuration steps in UI.
      Default:
      ""
    • inheritance

      Inheritance inheritance
      Specify how overridden methods in derived classes should be handled. By default, overridden methods are not instrumented. This means that an abstract annotated method and overridden methods in derived classes that do not call super() will not generate any transactions.

      If you set the inheritance parameter to something other than Mode.NONE, overridden methods will be instrumented according to the rules in the Inheritance parameter. See the documentation for Inheritance for a detailed explanation.

      Default:
      @com.perfino.annotation.Inheritance(NONE)
    • reentryInhibition

      ReentryInhibition reentryInhibition
      Specify under what conditions this transaction should be created as a nested transaction. If another transaction is underway, you might want to limit the creation of further transactions. By default, no transactions generated from the same annotation are directly nested.
      Default:
      ANNOTATION