diff --git a/docs/Connectable-Observable-Operators.md b/docs/Connectable-Observable-Operators.md
index 582f0fac12..157ded821b 100644
--- a/docs/Connectable-Observable-Operators.md
+++ b/docs/Connectable-Observable-Operators.md
@@ -7,25 +7,22 @@ This section explains the [`ConnectableObservable`](http://reactivex.io/RxJava/j
A Connectable Observable resembles an ordinary Observable, except that it does not begin emitting items when it is subscribed to, but only when its `connect()` method is called. In this way you can wait for all intended Subscribers to subscribe to the Observable before the Observable begins emitting items.
-
+
The following example code shows two Subscribers subscribing to the same Observable. In the first case, they subscribe to an ordinary Observable; in the second case, they subscribe to a Connectable Observable that only connects after both Subscribers subscribe. Note the difference in the output:
**Example #1:**
-```groovy
-def firstMillion = Observable.range( 1, 1000000 ).sample(7, java.util.concurrent.TimeUnit.MILLISECONDS);
+```java
+Observable firstMillion = Observable.range(1, 1000000).sample(7, java.util.concurrent.TimeUnit.MILLISECONDS);
-firstMillion.subscribe(
- { println("Subscriber #1:" + it); }, // onNext
- { println("Error: " + it.getMessage()); }, // onError
- { println("Sequence #1 complete"); } // onCompleted
-);
-
-firstMillion.subscribe(
- { println("Subscriber #2:" + it); }, // onNext
- { println("Error: " + it.getMessage()); }, // onError
- { println("Sequence #2 complete"); } // onCompleted
-);
+firstMillion.subscribe(next -> System.out.println("Subscriber #1: " + next), // onNext
+ throwable -> System.out.println("Error: " + throwable), // onError
+ () -> System.out.println("Sequence #1 complete") // onComplete
+ );
+firstMillion.subscribe(next -> System.out.println("Subscriber #2: " + next), // onNext
+ throwable -> System.out.println("Error: " + throwable), // onError
+ () -> System.out.println("Sequence #2 complete") // onComplete
+ );
```
```
Subscriber #1:211128
@@ -40,20 +37,18 @@ Subscriber #2:826996
Sequence #2 complete
```
**Example #2:**
-```groovy
-def firstMillion = Observable.range( 1, 1000000 ).sample(7, java.util.concurrent.TimeUnit.MILLISECONDS).publish();
+```java
+ConnectableObservable firstMillion = Observable.range(1, 1000000).sample(7, java.util.concurrent.TimeUnit.MILLISECONDS).publish();
-firstMillion.subscribe(
- { println("Subscriber #1:" + it); }, // onNext
- { println("Error: " + it.getMessage()); }, // onError
- { println("Sequence #1 complete"); } // onCompleted
-);
+firstMillion.subscribe(next -> System.out.println("Subscriber #1: " + next), // onNext
+ throwable -> System.out.println("Error: " + throwable), // onError
+ () -> System.out.println("Sequence #1 complete") // onComplete
+ );
-firstMillion.subscribe(
- { println("Subscriber #2:" + it); }, // onNext
- { println("Error: " + it.getMessage()); }, // onError
- { println("Sequence #2 complete"); } // onCompleted
-);
+firstMillion.subscribe(next -> System.out.println("Subscriber #2: " + next), // onNext
+ throwable -> System.out.println("Error: " + throwable), // onError
+ () -> System.out.println("Sequence #2 complete") // onComplete
+ );
firstMillion.connect();
```
diff --git a/docs/Getting-Started.md b/docs/Getting-Started.md
index fb9baa47dd..e3453fbc28 100644
--- a/docs/Getting-Started.md
+++ b/docs/Getting-Started.md
@@ -1,20 +1,20 @@
## Getting Binaries
-You can find binaries and dependency information for Maven, Ivy, Gradle, SBT, and others at [http://search.maven.org](http://search.maven.org/#search%7Cga%7C1%7Cg%3A"io.reactivex.rxjava2"%20AND%20"rxjava2").
+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).
Example for Maven:
```xml
- io.reactivex.rxjava2
+ io.reactivex.rxjava3
rxjava
- 2.2.0
+ 3.0.4
```
and for Ivy:
```xml
-
+
```
and for SBT:
@@ -22,12 +22,12 @@ and for SBT:
```scala
libraryDependencies += "io.reactivex" %% "rxscala" % "0.26.5"
-libraryDependencies += "io.reactivex.rxjava2" % "rxjava" % "2.2.0"
+libraryDependencies += "io.reactivex.rxjava3" % "rxjava" % "3.0.4"
```
and for Gradle:
```groovy
-compile 'io.reactivex.rxjava2:rxjava:2.2.0'
+compile 'io.reactivex.rxjava3:rxjava:3.0.4'
```
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
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
4.0.0
- io.reactivex.rxjava2
+ io.reactivex.rxjava3
rxjava
- 2.2.0
+ 3.0.4
RxJava
Reactive Extensions for Java
https://github.com/ReactiveX/RxJava
- io.reactivex.rxjava2
+ io.reactivex.rxjava3
rxjava
- 2.2.0
+ 3.0.4
@@ -66,7 +66,7 @@ You need Java 6 or later.
### Snapshots
-Snapshots are available via [JFrog](https://oss.jfrog.org/libs-snapshot/io/reactivex/rxjava2/rxjava/):
+Snapshots are available via [JFrog](https://oss.jfrog.org/libs-snapshot/io/reactivex/rxjava3/rxjava/):
```groovy
repositories {
@@ -74,7 +74,7 @@ repositories {
}
dependencies {
- compile 'io.reactivex.rxjava2:rxjava:2.2.0-SNAPSHOT'
+ compile 'io.reactivex.rxjava3:rxjava:3.0.4'
}
```