Skip to content

Commit 6b914fc

Browse files
author
Stephane Maldini
committed
Merge branch 'master' of github.com:reactive-streams/reactive-streams
2 parents 415b61e + 317593f commit 6b914fc

35 files changed

+3009
-749
lines changed

README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ public interface Publisher<T> {
8787
| <a name="1.7">7</a> | Once a terminal state has been signaled (`onError`, `onComplete`) it is REQUIRED that no further signals occur |
8888
| <a name="1.8">8</a> | If a `Subscription` is cancelled its `Subscriber` MUST eventually stop being signaled |
8989
| <a name="1.9">9</a> | Invoking `Publisher.subscribe` MUST return normally. The only legal way to signal failure (or reject a `Subscriber`) is via the `onError` method |
90-
| <a name="1.10">10</a> | `Publisher.subscribe` MAY be called as many times as wanted but MUST be with a different `Subscriber` each time [see [2.12](#2.12)]. It is RECOMMENDED to reject the `Subscription` with a `java.lang.IllegalStateException` if the same `Subscriber` already has an active `Subscription` with this `Publisher`. The cause message MUST include a reference to this rule and/or quote the full rule |
90+
| <a name="1.10">10</a> | `Publisher.subscribe` MAY be called as many times as wanted but MUST be with a different `Subscriber` each time [see [2.12](#2.12)] |
9191
| <a name="1.11">11</a> | A `Publisher` MAY support multi-subscribe and choose whether each `Subscription` is unicast or multicast |
9292
| <a name="1.12">12</a> | A `Publisher` MAY reject calls to its `subscribe` method if it is unable or unwilling to serve them [[1](#footnote-1-1)]. If rejecting it MUST do this by calling `onError` on the `Subscriber` passed to `Publisher.subscribe` instead of calling `onSubscribe` |
9393
| <a name="1.13">13</a> | A `Publisher` MUST produce the same elements, starting with the oldest element still available, in the same sequence for all its subscribers and MAY produce the stream elements at (temporarily) differing rates to different subscribers |
@@ -150,7 +150,7 @@ public interface Subscription {
150150
| <a name="3.14">14</a> | While the `Subscription` is not cancelled, invoking `Subscription.cancel` MAY cause the `Publisher`, if stateful, to transition into the `shut-down` state if no other `Subscription` exists at this point [see [1.13](#1.13)].
151151
| <a name="3.15">15</a> | `Subscription.cancel` MUST NOT throw an `Exception` and MUST signal `onError` to its `Subscriber` |
152152
| <a name="3.16">16</a> | `Subscription.request` MUST NOT throw an `Exception` and MUST signal `onError` to its `Subscriber` |
153-
| <a name="3.17">17</a> | A `Subscription` MUST support an unbounded number of calls to request and MUST support a pending request count up to 2^63-1 (`java.lang.Long.MAX_VALUE`). A pending request count of exactly 2^63-1 (`java.lang.Long.MAX_VALUE`) MAY be considered by the `Publisher` as `effectively unbounded`[[1](#footnote-3-1)]. If more than 2^63-1 are requested in pending then it MUST signal an onError with `java.lang.IllegalStateException` on the given `Subscriber`. The cause message MUST include a reference to this rule and/or quote the full rule |
153+
| <a name="3.17">17</a> | A `Subscription` MUST support an unbounded number of calls to request and MUST support a demand (sum requested - sum delivered) up to 2^63-1 (`java.lang.Long.MAX_VALUE`). A demand of exactly 2^63-1 (`java.lang.Long.MAX_VALUE`) MAY be considered by the `Publisher` as `effectively unbounded`[[1](#footnote-3-1)]. If demand becomes higher than 2^63-1 then the `Publisher` MUST signal an onError with `java.lang.IllegalStateException` on the given `Subscriber`. The cause message MUST include a reference to this rule and/or quote the full rule |
154154
155155
[<a name="footnote-3-1">1</a>] : As it is not feasibly reachable with current or forseen hardware within a reasonable amount of time (1 element per nanosecond would take 292 years) to fulfill a demand of 2^63-1.
156156

examples/build.gradle

+2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
description = 'reactive-streams-examples'
22
dependencies {
33
compile project(':reactive-streams')
4+
testCompile project(':reactive-streams-tck')
45
}
6+
test.useTestNG()

examples/src/main/java/org/reactivestreams/example/multicast/MulticastExample.java

-23
This file was deleted.

examples/src/main/java/org/reactivestreams/example/multicast/NeverEndingStockStream.java

-75
This file was deleted.

examples/src/main/java/org/reactivestreams/example/multicast/Stock.java

-15
This file was deleted.

examples/src/main/java/org/reactivestreams/example/multicast/StockPricePublisher.java

-73
This file was deleted.

examples/src/main/java/org/reactivestreams/example/multicast/StockPriceSubscriber.java

-78
This file was deleted.

0 commit comments

Comments
 (0)