Skip to content

Commit 72e97aa

Browse files
authored
Reactive cleanup (helidon-io#1572)
* Remove obsolete processors * Tests clean-up * Remove obsolete MappingProcessor * Reactive cleanup backward incompatible change Signed-off-by: Daniel Kec <daniel.kec@oracle.com>
1 parent ebf787b commit 72e97aa

25 files changed

Lines changed: 35 additions & 2448 deletions

CHANGELOG.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,40 @@ This is the third milestone release of Helidon 2.0.
1919

2020
### Backward incompatible changes
2121

22+
#### Removal of processor-like operators
23+
The formerly public `Flow.Processor` implementations performing common operations have been removed.
24+
Users should use the respective operators from `Single` and `Multi` instead:
25+
26+
```java
27+
// before
28+
Flow.Publisher<Integer> source = ...
29+
MappingProcessor<Integer, String> mapper = new MappingProcessor<>(Integer::toString);
30+
source.subscribe(mapper);
31+
mapper.subscribe(subscriber);
32+
33+
// after
34+
Flow.Publisher<Integer> source = ...
35+
Multi.from(source)
36+
.map(Integer::toString)
37+
.subscribe(subscriber)
38+
```
39+
40+
#### Removal of Flows
41+
The class was providing basic `Flow.Publisher` implementations. Users should pick one of the static methods of
42+
`Single` or `Multi` instead, which provide the additional benefits of having fluent operators available to them for
43+
assembling reactive flows conveniently:
44+
```java
45+
// before
46+
Flow.Publisher<Integer> just = Flows.singletonPublisher(1);
47+
Flow.Publisher<Object> empty = Flows.emptyPublisher();
48+
49+
// after
50+
Multi<Integer> just1 = Multi.singleton(1);
51+
Single<Integer> just2 = Single.just(1);
52+
53+
Multi<Object> empty1 = Multi.empty();
54+
Single<Object> empty2 = Single.empty();
55+
```
2256

2357
## [2.0.0-M2]
2458

common/reactive/src/main/java/io/helidon/common/reactive/BaseProcessor.java

Lines changed: 0 additions & 246 deletions
This file was deleted.

common/reactive/src/main/java/io/helidon/common/reactive/Flows.java

Lines changed: 0 additions & 66 deletions
This file was deleted.

common/reactive/src/main/java/io/helidon/common/reactive/ListCollector.java

Lines changed: 0 additions & 43 deletions
This file was deleted.

0 commit comments

Comments
 (0)