Annotation Type ExecuteOn


  • @Documented
    @Retention(RUNTIME)
    @Target({METHOD,ANNOTATION_TYPE,TYPE})
    public @interface ExecuteOn
    Annotation used to indicate which executor service a particular task should run on.

    Micronaut will by default run end user operations in the same thread that executes the request. This annotation can be used to indicate that a different thread should be used when executing an operation.

    Used to, for example, offload blocking I/O operations to specifically configured thread pool.

    Since:
    2.0
    See Also:
    TaskExecutors.IO
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      java.lang.String value  
    • Element Detail

      • value

        java.lang.String value
        Returns:
        The name of a configured executor service.
        See Also:
        TaskExecutors.IO