Top Description Methods
io.smallrye.common.annotation

public @Interface Blocking

extends Annotation
Annotations
@Retention:RUNTIME
@Target:METHOD, TYPE
Imports
java.lang.annotation.ElementType, .Retention, .RetentionPolicy, .Target

Annotation used to indicate that the annotated method is inherently blocking and so should not be executed on a non-blockable thread (I/O thread, event loops...).

Frameworks can add support for this annotation and offload the work to another thread if the current thread cannot be blocked. It's particularly useful for frameworks using a reactive execution model. Framework relying on this annotation must specify the exact behavior:

When this annotation is used on a class, all the methods declared by the annotated class are considered blocking.

This annotation is not inheritable, so the user must repeat the annotation when sub-classing the class or overriding the method.

See Also
NonBlocking

Method Summary

Inherited from java.lang.annotation.Annotation:
annotationTypeequalshashCodetoString