Annotation Type 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
      java.lang.String group
      Specify a group name for the perfino UI configuration.
      Inheritance inheritance
      Specify how overridden methods in derived classes should be handled.
      Part[] naming
      Specify the name of the transactions that are created by the annotated method.
      ReentryInhibition reentryInhibition
      Specify under what conditions this transaction should be created as a nested transaction.
    • Element Detail

      • 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=com.perfino.annotation.Part.Type.CLASS, text="."), @com.perfino.annotation.Part(com.perfino.annotation.Part.Type.METHOD)}
      • group

        java.lang.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(com.perfino.annotation.Inheritance.Mode.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:
        com.perfino.annotation.ReentryInhibition.ANNOTATION