Annotation Type NonBlocking


  • @Retention(RUNTIME)
    @Target(METHOD)
    public @interface NonBlocking
    Annotation used to indicate that the annotated method is inherently non-blocking and so can be executed on a non-blockable thread (I/O threads, event loops...) without the need to offload the work to another thread. If the caller thread can be blocked, it should also be safe to execute the method on that thread.

    It's up to the framework relying on this annotation do define the exact behavior, like what thread is considered as a non-blockable thread.

    This annotation is not inheritable, so the user must repeat the annotation when overriding the method.

    See Also:
    Blocking