Package arez.annotations
Annotation Interface RequiresTransaction
Annotation that marks a method as requiring an existing Arez transaction.
The method that is annotated with this annotation must comply with the additional constraints:
- Must not be annotated with any other arez annotation
- Must not be private
- Must not be static
- Must not be final
- Must not be abstract
- Must be accessible to the class annotated by the
ArezComponentannotation.
This annotation is only supported on methods contained within a type annotated by
ArezComponent or ArezComponentLike. Other usages will fail compilation.
Unlike Action, this annotation never creates or wraps a transaction and instead verifies
that the caller has already established a transaction with the required characteristics.
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionReturn the required mode of the existing transaction.Return the required tracking state of the existing transaction.
-
Element Details
-
mode
Return the required mode of the existing transaction.- Returns:
- the required mode of the existing transaction.
- Default:
- ANY
-
tracking
Return the required tracking state of the existing transaction.- Returns:
- the required tracking state of the existing transaction.
- Default:
- ANY
-