Skip to content

Commit 80df73b

Browse files
committed
Update RxJava 3 -> RxJava 4 texts
1 parent 9a6236a commit 80df73b

25 files changed

Lines changed: 80 additions & 80 deletions

DESIGN.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -586,7 +586,7 @@ interface QueueSubscription<T> implements Queue<T>, Subscription {
586586

587587
For performance, the mode is an integer bitflags setup, called early during subscription time, and allows negotiating the fusion mode. Usually, producers can do only one mode and consumers can do both mode. Because fused, intermediate operators attach logic (which is many times user-callback) to the exit point of the queue interface (poll()), it may change the computation location of those callbacks in an unwanted way. The flag `BOUNDARY` is added by consumers indicating that they will consume the queue over an async boundary. Intermediate operators, such as `map` and `filter` then can reject the fusion in such sequences.
588588

589-
Since RxJava 3.x is still JDK 6 compatible, the `QueueSubscription` can't itself default unnecessary methods and implementations are required to throw `UnsupportedOperationException` for `Queue` methods other than the following:
589+
Since RxJava 4.x is still JDK 26 compatible, the `QueueSubscription` can't itself default unnecessary methods and implementations are required to throw `UnsupportedOperationException` for `Queue` methods other than the following:
590590

591591
- `poll()`.
592592
- `isEmpty()`.

README.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -48,10 +48,10 @@ The [1.x version](https://github.com/ReactiveX/RxJava/tree/1.x) is end-of-life a
4848
The first step is to include RxJava 4 into your project, for example, as a Gradle compile dependency:
4949

5050
```groovy
51-
implementation "io.reactivex.rxjava3:rxjava:3.x.y"
51+
implementation "io.reactivex.rxjava4:rxjava:4.x.y"
5252
```
5353

54-
(Please replace `x` and `y` with the latest version numbers: [![Maven Central](https://maven-badges.sml.io/sonatype-central/io.reactivex.rxjava3/rxjava/badge.svg)](https://maven-badges.sml.io/sonatype-central/io.reactivex.rxjava3/rxjava)
54+
(Please replace `x` and `y` with the latest version numbers: [![Maven Central](https://maven-badges.sml.io/sonatype-central/io.reactivex.rxjava4/rxjava/badge.svg)](https://maven-badges.sml.io/sonatype-central/io.reactivex.rxjava4/rxjava)
5555
)
5656

5757
### Hello World
@@ -70,11 +70,11 @@ public class HelloWorld {
7070
}
7171
```
7272

73-
Note that RxJava 3 components now live under `io.reactivex.rxjava3` and the base classes and interfaces live under `io.reactivex.rxjava4.core`.
73+
Note that RxJava 4 components now live under `io.reactivex.rxjava4` and the base classes and interfaces live under `io.reactivex.rxjava4.core`.
7474

7575
### Base classes
7676

77-
RxJava 3 features several base classes you can discover operators on:
77+
RxJava 4 features several base classes you can discover operators on:
7878

7979
- [`io.reactivex.rxjava4.core.Flowable`](http://reactivex.io/RxJava/4.x/javadoc/io/reactivex/rxjava4/core/Flowable.html): 0..N flows, supporting Reactive-Streams and backpressure
8080
- [`io.reactivex.rxjava4.core.Observable`](http://reactivex.io/RxJava/4.x/javadoc/io/reactivex/rxjava4/core/Observable.html): 0..N flows, no backpressure,
@@ -197,7 +197,7 @@ Typically, you can move computations or blocking IO to some other thread via `su
197197

198198
### Schedulers
199199

200-
RxJava operators don't work with `Thread`s or `ExecutorService`s directly but with so-called `Scheduler`s that abstract away sources of concurrency behind a uniform API. RxJava 3 features several standard schedulers accessible via `Schedulers` utility class.
200+
RxJava operators don't work with `Thread`s or `ExecutorService`s directly but with so-called `Scheduler`s that abstract away sources of concurrency behind a uniform API. RxJava 4 features several standard schedulers accessible via `Schedulers` utility class.
201201

202202
- `Schedulers.computation()`: Run computation intensive work on a fixed number of dedicated threads in the background. Most asynchronous operators use this as their default `Scheduler`.
203203
- `Schedulers.io()`: Run I/O-like or blocking operations on a dynamically changing set of threads.
@@ -470,7 +470,7 @@ Flowable<T> concatArrayEagerDelayError(Publisher<? extends T>... sources);
470470

471471
#### Base class vs base type
472472

473-
The base classes can be considered heavy due to the sheer number of static and instance methods on them. RxJava 3's design was heavily influenced by the [Reactive Streams](https://github.com/reactive-streams/reactive-streams-jvm#reactive-streams) specification, therefore, the library features a class and an interface per each reactive type:
473+
The base classes can be considered heavy due to the sheer number of static and instance methods on them. RxJava 4's design was heavily influenced by the [Reactive Streams](https://github.com/reactive-streams/reactive-streams-jvm#reactive-streams) specification, therefore, the library features a class and an interface per each reactive type:
474474

475475
| Type | Class | Interface | Consumer |
476476
|------|-------|-----------|----------|
@@ -502,7 +502,7 @@ It is recommended one sets up the following `-dontwarn` entry in the application
502502
-dontwarn java.util.concurrent.Flow*
503503
```
504504

505-
For R8, the RxJava jar includes the `META-INF/proguard/rxjava3.pro` with the same no-warning clause and should apply automatically.
505+
For R8, the RxJava jar includes the `META-INF/proguard/rxjava4.pro` with the same no-warning clause and should apply automatically.
506506

507507
### Further reading
508508

@@ -549,27 +549,27 @@ All code inside the `io.reactivex.rxjava4.internal.*` packages are considered pr
549549

550550
## Binaries
551551

552-
Binaries and dependency information for Maven, Ivy, Gradle and others can be found at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Cio.reactivex.rxjava3).
552+
Binaries and dependency information for Maven, Ivy, Gradle and others can be found at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Cio.reactivex.rxjava4).
553553

554554
Example for Gradle:
555555

556556
```groovy
557-
implementation 'io.reactivex.rxjava3:rxjava:x.y.z'
557+
implementation 'io.reactivex.rxjava4:rxjava:x.y.z'
558558
```
559559

560560
and for Maven:
561561

562562
```xml
563563
<dependency>
564-
<groupId>io.reactivex.rxjava3</groupId>
564+
<groupId>io.reactivex.rxjava4</groupId>
565565
<artifactId>rxjava</artifactId>
566566
<version>x.y.z</version>
567567
</dependency>
568568
```
569569
and for Ivy:
570570

571571
```xml
572-
<dependency org="io.reactivex.rxjava3" name="rxjava" rev="x.y.z" />
572+
<dependency org="io.reactivex.rxjava4" name="rxjava" rev="x.y.z" />
573573
```
574574

575575
### Snapshots
@@ -582,7 +582,7 @@ repositories {
582582
}
583583
584584
dependencies {
585-
implementation 'io.reactivex.rxjava3:rxjava:3.0.0-SNAPSHOT'
585+
implementation 'io.reactivex.rxjava4:rxjava:4.0.0-SNAPSHOT'
586586
}
587587
```
588588

docs/Getting-Started.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
## Getting Binaries
22

3-
You can find binaries and dependency information for Maven, Ivy, Gradle, SBT, and others at [http://search.maven.org](https://search.maven.org/search?q=g:io.reactivex.rxjava3%20AND%20rxjava).
3+
You can find binaries and dependency information for Maven, Ivy, Gradle, SBT, and others at [http://search.maven.org](https://search.maven.org/search?q=g:io.reactivex.rxjava4%20AND%20rxjava).
44

55
Example for Maven:
66

77
```xml
88
<dependency>
9-
<groupId>io.reactivex.rxjava3</groupId>
9+
<groupId>io.reactivex.rxjava4</groupId>
1010
<artifactId>rxjava</artifactId>
11-
<version>3.0.4</version>
11+
<version>4.0.0</version>
1212
</dependency>
1313
```
1414
and for Ivy:
1515

1616
```xml
17-
<dependency org="io.reactivex.rxjava3" name="rxjava" rev="3.0.4" />
17+
<dependency org="io.reactivex.rxjava4" name="rxjava" rev="4.0.0" />
1818
```
1919

2020
and for SBT:
2121

2222
```scala
2323
libraryDependencies += "io.reactivex" %% "rxscala" % "0.26.5"
2424

25-
libraryDependencies += "io.reactivex.rxjava3" % "rxjava" % "3.0.4"
25+
libraryDependencies += "io.reactivex.rxjava4" % "rxjava" % "4.0.0"
2626
```
2727

2828
and for Gradle:
2929
```groovy
30-
implementation 'io.reactivex.rxjava3:rxjava:3.0.4'
30+
implementation 'io.reactivex.rxjava4:rxjava:4.0.0'
3131
```
3232

3333
If you need to download the jars instead of using a build system, create a Maven `pom` file like this with the desired version:
@@ -38,17 +38,17 @@ If you need to download the jars instead of using a build system, create a Maven
3838
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3939
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4040
<modelVersion>4.0.0</modelVersion>
41-
<groupId>io.reactivex.rxjava3</groupId>
41+
<groupId>io.reactivex.rxjava4</groupId>
4242
<artifactId>rxjava</artifactId>
4343
<version>3.0.4</version>
4444
<name>RxJava</name>
4545
<description>Reactive Extensions for Java</description>
4646
<url>https://github.com/ReactiveX/RxJava</url>
4747
<dependencies>
4848
<dependency>
49-
<groupId>io.reactivex.rxjava3</groupId>
49+
<groupId>io.reactivex.rxjava4</groupId>
5050
<artifactId>rxjava</artifactId>
51-
<version>3.0.4</version>
51+
<version>4.0.0</version>
5252
</dependency>
5353
</dependencies>
5454
</project>
@@ -74,7 +74,7 @@ repositories {
7474
}
7575
7676
dependencies {
77-
implementation 'io.reactivex.rxjava3:rxjava:4.0.0-SNAPSHOT'
77+
implementation 'io.reactivex.rxjava4:rxjava:4.0.0-SNAPSHOT'
7878
}
7979
```
8080

docs/Writing-operators-for-2.0.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1574,7 +1574,7 @@ This is the level of the Reactive-Streams based libraries such as **Reactor 2**
15741574
#### Generation 4
15751575
This level expands upon the Reactive-Streams interfaces with operator-fusion (in a compatible fashion, that is, op-fusion is optional between two stages and works without them). **Reactor 3** and **RxJava 2** are at this level. The material around **Akka-Stream** mentions operator-fusion as well, however, **Akka-Stream** is not a native Reactive-Streams implementation (requires a materializer to get a `Publisher` out) and as such it is only Gen 3.
15761576
1577-
There are discussions among the 4th generation library providers to have the elements of operator-fusion standardized in Reactive-Streams 2.0 specification (or in a neighboring extension) and have **RxJava 3** and **Reactor 4** work together on that aspect as well.
1577+
There are discussions among the 4th generation library providers to have the elements of operator-fusion standardized in Reactive-Streams 2.0 specification (or in a neighboring extension) and have **RxJava 4** and **Reactor 4** work together on that aspect as well.
15781578
15791579
## Components
15801580

src/main/java/io/reactivex/rxjava4/core/FlowableSubscriber.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import io.reactivex.rxjava4.annotations.NonNull;
1919

2020
/**
21-
* Represents a Reactive-Streams inspired {@link Subscriber} that is RxJava 3 only
21+
* Represents a Reactive-Streams inspired {@link Subscriber} that is RxJava 4 only
2222
* and weakens the Reactive Streams rules <a href='https://github.com/reactive-streams/reactive-streams-jvm#1.3'>§1.3</a>
2323
* and <a href='https://github.com/reactive-streams/reactive-streams-jvm#3.9'>§3.9</a> of the specification
2424
* for gaining performance.

src/test/java/io/reactivex/rxjava4/internal/jdk8/FlowableCollectWithCollectorTest.java

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ public Supplier<Integer> supplier() {
103103

104104
@Override
105105
public BiConsumer<Integer, Integer> accumulator() {
106-
return (a, b) -> { throw new TestException(); };
106+
return (_, _) -> { throw new TestException(); };
107107
}
108108

109109
@Override
@@ -139,7 +139,7 @@ public Supplier<Integer> supplier() {
139139

140140
@Override
141141
public BiConsumer<Integer, Integer> accumulator() {
142-
return (a, b) -> { };
142+
return (_, _) -> { };
143143
}
144144

145145
@Override
@@ -149,7 +149,7 @@ public BinaryOperator<Integer> combiner() {
149149

150150
@Override
151151
public Function<Integer, Integer> finisher() {
152-
return a -> { throw new TestException(); };
152+
return _ -> { throw new TestException(); };
153153
}
154154

155155
@Override
@@ -185,7 +185,7 @@ public Supplier<Integer> supplier() {
185185

186186
@Override
187187
public BiConsumer<Integer, Integer> accumulator() {
188-
return (a, b) -> { throw new TestException(); };
188+
return (_, _) -> { throw new TestException(); };
189189
}
190190

191191
@Override
@@ -260,7 +260,7 @@ public Supplier<Integer> supplier() {
260260

261261
@Override
262262
public BiConsumer<Integer, Integer> accumulator() {
263-
return (a, b) -> { };
263+
return (_, _) -> { };
264264
}
265265

266266
@Override
@@ -297,7 +297,7 @@ public Supplier<Integer> supplier() {
297297

298298
@Override
299299
public BiConsumer<Integer, Integer> accumulator() {
300-
return (a, b) -> { throw new TestException(); };
300+
return (_, _) -> { throw new TestException(); };
301301
}
302302

303303
@Override
@@ -334,7 +334,7 @@ public Supplier<Integer> supplier() {
334334

335335
@Override
336336
public BiConsumer<Integer, Integer> accumulator() {
337-
return (a, b) -> { };
337+
return (_, _) -> { };
338338
}
339339

340340
@Override
@@ -344,7 +344,7 @@ public BinaryOperator<Integer> combiner() {
344344

345345
@Override
346346
public Function<Integer, Integer> finisher() {
347-
return a -> { throw new TestException(); };
347+
return _ -> { throw new TestException(); };
348348
}
349349

350350
@Override
@@ -381,7 +381,7 @@ public Supplier<Integer> supplier() {
381381

382382
@Override
383383
public BiConsumer<Integer, Integer> accumulator() {
384-
return (a, b) -> { throw new TestException(); };
384+
return (_, _) -> { throw new TestException(); };
385385
}
386386

387387
@Override

src/test/java/io/reactivex/rxjava4/internal/jdk8/ObservableCollectWithCollectorTest.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public Supplier<Integer> supplier() {
7070

7171
@Override
7272
public BiConsumer<Integer, Integer> accumulator() {
73-
return (a, b) -> { };
73+
return (_, _) -> { };
7474
}
7575

7676
@Override
@@ -106,7 +106,7 @@ public Supplier<Integer> supplier() {
106106

107107
@Override
108108
public BiConsumer<Integer, Integer> accumulator() {
109-
return (a, b) -> { throw new TestException(); };
109+
return (_, _) -> { throw new TestException(); };
110110
}
111111

112112
@Override
@@ -142,7 +142,7 @@ public Supplier<Integer> supplier() {
142142

143143
@Override
144144
public BiConsumer<Integer, Integer> accumulator() {
145-
return (a, b) -> { };
145+
return (_, _) -> { };
146146
}
147147

148148
@Override
@@ -152,7 +152,7 @@ public BinaryOperator<Integer> combiner() {
152152

153153
@Override
154154
public Function<Integer, Integer> finisher() {
155-
return a -> { throw new TestException(); };
155+
return _ -> { throw new TestException(); };
156156
}
157157

158158
@Override
@@ -188,7 +188,7 @@ public Supplier<Integer> supplier() {
188188

189189
@Override
190190
public BiConsumer<Integer, Integer> accumulator() {
191-
return (a, b) -> { throw new TestException(); };
191+
return (_, _) -> { throw new TestException(); };
192192
}
193193

194194
@Override
@@ -263,7 +263,7 @@ public Supplier<Integer> supplier() {
263263

264264
@Override
265265
public BiConsumer<Integer, Integer> accumulator() {
266-
return (a, b) -> { };
266+
return (_, _) -> { };
267267
}
268268

269269
@Override
@@ -300,7 +300,7 @@ public Supplier<Integer> supplier() {
300300

301301
@Override
302302
public BiConsumer<Integer, Integer> accumulator() {
303-
return (a, b) -> { throw new TestException(); };
303+
return (_, _) -> { throw new TestException(); };
304304
}
305305

306306
@Override
@@ -337,7 +337,7 @@ public Supplier<Integer> supplier() {
337337

338338
@Override
339339
public BiConsumer<Integer, Integer> accumulator() {
340-
return (a, b) -> { };
340+
return (_, _) -> { };
341341
}
342342

343343
@Override
@@ -347,7 +347,7 @@ public BinaryOperator<Integer> combiner() {
347347

348348
@Override
349349
public Function<Integer, Integer> finisher() {
350-
return a -> { throw new TestException(); };
350+
return _ -> { throw new TestException(); };
351351
}
352352

353353
@Override
@@ -384,7 +384,7 @@ public Supplier<Integer> supplier() {
384384

385385
@Override
386386
public BiConsumer<Integer, Integer> accumulator() {
387-
return (a, b) -> { throw new TestException(); };
387+
return (_, _) -> { throw new TestException(); };
388388
}
389389

390390
@Override

0 commit comments

Comments
 (0)