Annotation Interface SafeVertxContext


@InterceptorBinding @Retention(RUNTIME) @Target({TYPE,METHOD,CONSTRUCTOR}) @Inherited public @interface SafeVertxContext
Indicates that the annotated method should be invoked on a safe duplicated context. This interceptor binding is a declarative alternative to the
invalid reference
VertxContextSafetyToggle
.

Important: You must only use this annotation if the annotated method does not access the context concurrently.

If the method is not run on a duplicated context, the interceptor fails. If the method is invoked on an unmarked duplicated context, the context is marked as `safe` and the method is called. If the method is invoked on a `safe` duplicated context, the method is called. If the method is invoked on an `unsafe` duplicated context, the interceptor fails, except if force() is set to true. In this case, the duplicated context is marked as `safe` and the method is called.

  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
     
  • Element Details

    • force

      boolean force
      Returns:
      whether the current safety flag of the current context must be overridden.
      Default:
      false