Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reactive blocking context aware annotations #58

Merged
merged 3 commits into from Aug 12, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
@@ -1,6 +1,10 @@
Changelog
===

Version 22.0.0
---
* Added new annotations: `@Blocking` and `@NonBlocking`.

Version 21.0.1
---
* Multi-Release Jar: Manifest fixed
Expand Down
1 change: 0 additions & 1 deletion build.gradle
Expand Up @@ -18,7 +18,6 @@ import jetbrains.sign.GpgSignSignatoryProvider

buildscript {
repositories {
jcenter()
maven { url "https://packages.jetbrains.team/maven/p/jcs/maven" }
}
dependencies {
Expand Down
20 changes: 20 additions & 0 deletions common/src/main/java/org/jetbrains/annotations/Blocking.java
@@ -0,0 +1,20 @@
package org.jetbrains.annotations;

import java.lang.annotation.*;

/**
* Indicates that the annotated method is inherently blocking and should not be executed in a non-blocking context.
* <p>
* When this annotation is used on a {@code class}, all the methods declared by the annotated class are considered
* <em>blocking</em>.
* <p>
* Apart from documentation purposes this annotation is intended to be used by static analysis tools to validate against
* probable runtime errors and element contract violations.
*
* @since 22.0.0
*/
@Documented
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE})
public @interface Blocking {
}
20 changes: 20 additions & 0 deletions common/src/main/java/org/jetbrains/annotations/NonBlocking.java
@@ -0,0 +1,20 @@
package org.jetbrains.annotations;

import java.lang.annotation.*;

/**
* Indicates that the annotated method is inherently non-blocking and can be executed in a non-blocking context.
* <p>
* When this annotation is used on a {@code class}, all the methods declared by the annotated class are considered
* <em>non-blocking</em>.
* <p>
* Apart from documentation purposes this annotation is intended to be used by static analysis tools to validate against
* probable runtime errors and contract violations.
*
* @since 22.0.0
*/
@Documented
@Retention(RetentionPolicy.CLASS)
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE})
public @interface NonBlocking {
}
2 changes: 1 addition & 1 deletion gradle.properties
Expand Up @@ -14,5 +14,5 @@
# limitations under the License.
#

projectVersion=21.0.1
projectVersion=22.0.0
#JDK_5=<path-to-older-java-version>