Annotation Type MatsClassMapping.Stage


  • @Target({METHOD,ANNOTATION_TYPE})
    @Retention(RUNTIME)
    @Documented
    public static @interface MatsClassMapping.Stage
    Each method in the class that shall correspond to a Stage on the Mats endpoint must be annotated with this @Stage annotation. An ordinal must be assigned to each stage, so that Mats knows which order the stages are in - read more about the ordinal number at ordinal(). The initial stage must have the ordinal zero, which also shall be the first stage in the resulting sorted list of Stages (i.e. negative values are not allowed) - this is the Stage which gets incoming messages targeted at the endpointId of this endpoint.
    • Field Summary

      Fields 
      Modifier and Type Fields Description
      static int INITIAL
      Constant for 0 (zero), the initial Stage's ordinal.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      java.lang.String concurrency
      A string representing the concurrency for the Stage, overriding the concurrency of the Endpoint.
      int ordinal
      The ordinal of this Stage in the sequence of stages of this endpoint - that is, an integer that expresses the relative position of this Stage wrt.
      int value
      Alias for "ordinal", so that if you only need to set the ordinal (which relative position in the sequence of stages this Stage is), you can do so directly: @Stage(INITIAL) and @Stage(3).
    • Field Detail

      • INITIAL

        static final int INITIAL
        Constant for 0 (zero), the initial Stage's ordinal.
    • Element Detail

      • ordinal

        @AliasFor("value")
        int ordinal
        The ordinal of this Stage in the sequence of stages of this endpoint - that is, an integer that expresses the relative position of this Stage wrt. to the other stages. The initial Stage must have the ordinal zero, you may use the constant INITIAL. The magnitude of the number does not matter, only the "sort order", so 0, 1, 2 is just as good as 0, 3, 5, which is just as good as 0, 4527890, 4527990 - although one can definitely discuss the relative merits between each approach.
        Returns:
        the ordinal of this Stage in the sequence of stages of this endpoint.
        Default:
        -1
      • value

        @AliasFor("ordinal")
        int value
        Alias for "ordinal", so that if you only need to set the ordinal (which relative position in the sequence of stages this Stage is), you can do so directly: @Stage(INITIAL) and @Stage(3).
        Returns:
        the ordinal of this Stage in the sequence of stages of this endpoint.
        See Also:
        ordinal()
        Default:
        -1
      • concurrency

        java.lang.String concurrency
        A string representing the concurrency for the Stage, overriding the concurrency of the Endpoint. See MatsClassMapping.concurrency() for more information.
        Default:
        ""