Annotation Type 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 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 force  
    • Element Detail

      • force

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