Skip to content

Commit a8de8a8

Browse files
authored
Merge pull request #58 from jreznot/reactive-blocking-annotations
Reactive blocking context aware annotations
2 parents 7c97da5 + 0ad8455 commit a8de8a8

File tree

5 files changed

+45
-2
lines changed

5 files changed

+45
-2
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
Changelog
22
===
33

4+
Version 22.0.0
5+
---
6+
* Added new annotations: `@Blocking` and `@NonBlocking`.
7+
48
Version 21.0.1
59
---
610
* Multi-Release Jar: Manifest fixed

build.gradle

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ import jetbrains.sign.GpgSignSignatoryProvider
1818

1919
buildscript {
2020
repositories {
21-
jcenter()
2221
maven { url "https://packages.jetbrains.team/maven/p/jcs/maven" }
2322
}
2423
dependencies {
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package org.jetbrains.annotations;
2+
3+
import java.lang.annotation.*;
4+
5+
/**
6+
* Indicates that the annotated method is inherently blocking and should not be executed in a non-blocking context.
7+
* <p>
8+
* When this annotation is used on a {@code class}, all the methods declared by the annotated class are considered
9+
* <em>blocking</em>.
10+
* <p>
11+
* Apart from documentation purposes this annotation is intended to be used by static analysis tools to validate against
12+
* probable runtime errors and element contract violations.
13+
*
14+
* @since 22.0.0
15+
*/
16+
@Documented
17+
@Retention(RetentionPolicy.CLASS)
18+
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE})
19+
public @interface Blocking {
20+
}
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
package org.jetbrains.annotations;
2+
3+
import java.lang.annotation.*;
4+
5+
/**
6+
* Indicates that the annotated method is inherently non-blocking and can be executed in a non-blocking context.
7+
* <p>
8+
* When this annotation is used on a {@code class}, all the methods declared by the annotated class are considered
9+
* <em>non-blocking</em>.
10+
* <p>
11+
* Apart from documentation purposes this annotation is intended to be used by static analysis tools to validate against
12+
* probable runtime errors and contract violations.
13+
*
14+
* @since 22.0.0
15+
*/
16+
@Documented
17+
@Retention(RetentionPolicy.CLASS)
18+
@Target({ElementType.METHOD, ElementType.CONSTRUCTOR, ElementType.TYPE})
19+
public @interface NonBlocking {
20+
}

gradle.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
# limitations under the License.
1515
#
1616

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

0 commit comments

Comments
 (0)