Annotation Type NonBlocking


  • @Documented
    @Retention(RUNTIME)
    @Target({METHOD,PARAMETER})
    public @interface NonBlocking
    Declares that a method or function-like method parameter is non-blocking and can freely use Promise and other async constructs.

    If this annotation is present on a method, it indicates that the method may be asynchronous. That is, it is not necessarily expected to have completed its logical work when the method returns. The method must however use Promise, Operation, or other execution mechanisms to perform asynchronous work.

    Most such methods are invoked as part of Ratpack. If you need to invoke such a method, do so as part of a discrete Operation.

    If this annotation is present on a function type method parameter, it indicates that the annotated function may be asynchronous. Similarly, if you need to invoke such a parameter, do so as part of a discrete Operation.

    Note: the ability to annotate method parameters with this annotation was added in version 1.1.0.