Skip to content

Commit 59454ea

Browse files
luis-cortesakarnokd
authored andcommitted
Fix terminology of cancel/dispose in the JavaDocs (#6199)
* #6196 Fixing terminology of cancel/dispose in the JavaDocs for Completable. * #6196 Fixing terminology of cancel/dispose in the JavaDocs for Maybe. * #6196 Fixing terminology of cancel/dispose in the JavaDocs for Observable. * #6196 Fixing terminology of cancel/dispose in the JavaDocs for Single. * #6196 Switching from subscribers to observers in `Completable.fromFuture()` JavaDoc
1 parent fbbae6c commit 59454ea

File tree

4 files changed

+92
-92
lines changed

4 files changed

+92
-92
lines changed

src/main/java/io/reactivex/Completable.java

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@
9090
* d.dispose();
9191
* </code></pre>
9292
* <p>
93-
* Note that by design, subscriptions via {@link #subscribe(CompletableObserver)} can't be cancelled/disposed
93+
* Note that by design, subscriptions via {@link #subscribe(CompletableObserver)} can't be disposed
9494
* from the outside (hence the
9595
* {@code void} return of the {@link #subscribe(CompletableObserver)} method) and it is the
9696
* responsibility of the implementor of the {@code CompletableObserver} to allow this to happen.
@@ -105,7 +105,7 @@
105105
public abstract class Completable implements CompletableSource {
106106
/**
107107
* Returns a Completable which terminates as soon as one of the source Completables
108-
* terminates (normally or with an error) and cancels all other Completables.
108+
* terminates (normally or with an error) and disposes all other Completables.
109109
* <p>
110110
* <img width="640" height="518" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.ambArray.png" alt="">
111111
* <dl>
@@ -133,7 +133,7 @@ public static Completable ambArray(final CompletableSource... sources) {
133133

134134
/**
135135
* Returns a Completable which terminates as soon as one of the source Completables
136-
* terminates (normally or with an error) and cancels all other Completables.
136+
* terminates (normally or with an error) and disposes all other Completables.
137137
* <p>
138138
* <img width="640" height="518" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.amb.png" alt="">
139139
* <dl>
@@ -306,7 +306,7 @@ public static Completable create(CompletableOnSubscribe source) {
306306
/**
307307
* Constructs a Completable instance by wrapping the given source callback
308308
* <strong>without any safeguards; you should manage the lifecycle and response
309-
* to downstream cancellation/dispose</strong>.
309+
* to downstream disposal</strong>.
310310
* <p>
311311
* <img width="640" height="260" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.unsafeCreate.png" alt="">
312312
* <dl>
@@ -446,7 +446,7 @@ public static Completable fromCallable(final Callable<?> callable) {
446446
* <p>
447447
* <img width="640" height="628" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.fromFuture.png" alt="">
448448
* <p>
449-
* Note that cancellation from any of the subscribers to this Completable will cancel the future.
449+
* Note that if any of the observers to this Completable call dispose, this Completable will cancel the future.
450450
* <dl>
451451
* <dt><b>Scheduler:</b></dt>
452452
* <dd>{@code fromFuture} does not operate by default on a particular {@link Scheduler}.</dd>
@@ -594,13 +594,13 @@ public static <T> Completable fromSingle(final SingleSource<T> single) {
594594
* <dd>{@code mergeArray} does not operate by default on a particular {@link Scheduler}.</dd>
595595
* <dt><b>Error handling:</b></dt>
596596
* <dd>If any of the source {@code CompletableSource}s signal a {@code Throwable} via {@code onError}, the resulting
597-
* {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are cancelled.
597+
* {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are disposed.
598598
* If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
599599
* first one's error or, depending on the concurrency of the sources, may terminate with a
600600
* {@code CompositeException} containing two or more of the various error signals.
601601
* {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
602602
* {@link RxJavaPlugins#onError(Throwable)} method as {@code UndeliverableException} errors. Similarly, {@code Throwable}s
603-
* signaled by source(s) after the returned {@code Completable} has been cancelled or terminated with a
603+
* signaled by source(s) after the returned {@code Completable} has been disposed or terminated with a
604604
* (composite) error will be sent to the same global error handler.
605605
* Use {@link #mergeArrayDelayError(CompletableSource...)} to merge sources and terminate only when all source {@code CompletableSource}s
606606
* have completed or failed with an error.
@@ -634,13 +634,13 @@ public static Completable mergeArray(CompletableSource... sources) {
634634
* <dd>{@code merge} does not operate by default on a particular {@link Scheduler}.</dd>
635635
* <dt><b>Error handling:</b></dt>
636636
* <dd>If any of the source {@code CompletableSource}s signal a {@code Throwable} via {@code onError}, the resulting
637-
* {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are cancelled.
637+
* {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are disposed.
638638
* If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
639639
* first one's error or, depending on the concurrency of the sources, may terminate with a
640640
* {@code CompositeException} containing two or more of the various error signals.
641641
* {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
642642
* {@link RxJavaPlugins#onError(Throwable)} method as {@code UndeliverableException} errors. Similarly, {@code Throwable}s
643-
* signaled by source(s) after the returned {@code Completable} has been cancelled or terminated with a
643+
* signaled by source(s) after the returned {@code Completable} has been disposed or terminated with a
644644
* (composite) error will be sent to the same global error handler.
645645
* Use {@link #mergeDelayError(Iterable)} to merge sources and terminate only when all source {@code CompletableSource}s
646646
* have completed or failed with an error.
@@ -671,13 +671,13 @@ public static Completable merge(Iterable<? extends CompletableSource> sources) {
671671
* <dd>{@code merge} does not operate by default on a particular {@link Scheduler}.</dd>
672672
* <dt><b>Error handling:</b></dt>
673673
* <dd>If any of the source {@code CompletableSource}s signal a {@code Throwable} via {@code onError}, the resulting
674-
* {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are cancelled.
674+
* {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are disposed.
675675
* If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
676676
* first one's error or, depending on the concurrency of the sources, may terminate with a
677677
* {@code CompositeException} containing two or more of the various error signals.
678678
* {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
679679
* {@link RxJavaPlugins#onError(Throwable)} method as {@code UndeliverableException} errors. Similarly, {@code Throwable}s
680-
* signaled by source(s) after the returned {@code Completable} has been cancelled or terminated with a
680+
* signaled by source(s) after the returned {@code Completable} has been disposed or terminated with a
681681
* (composite) error will be sent to the same global error handler.
682682
* Use {@link #mergeDelayError(Publisher)} to merge sources and terminate only when all source {@code CompletableSource}s
683683
* have completed or failed with an error.
@@ -708,13 +708,13 @@ public static Completable merge(Publisher<? extends CompletableSource> sources)
708708
* <dd>{@code merge} does not operate by default on a particular {@link Scheduler}.</dd>
709709
* <dt><b>Error handling:</b></dt>
710710
* <dd>If any of the source {@code CompletableSource}s signal a {@code Throwable} via {@code onError}, the resulting
711-
* {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are cancelled.
711+
* {@code Completable} terminates with that {@code Throwable} and all other source {@code CompletableSource}s are disposed.
712712
* If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
713713
* first one's error or, depending on the concurrency of the sources, may terminate with a
714714
* {@code CompositeException} containing two or more of the various error signals.
715715
* {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
716716
* {@link RxJavaPlugins#onError(Throwable)} method as {@code UndeliverableException} errors. Similarly, {@code Throwable}s
717-
* signaled by source(s) after the returned {@code Completable} has been cancelled or terminated with a
717+
* signaled by source(s) after the returned {@code Completable} has been disposed or terminated with a
718718
* (composite) error will be sent to the same global error handler.
719719
* Use {@link #mergeDelayError(Publisher, int)} to merge sources and terminate only when all source {@code CompletableSource}s
720720
* have completed or failed with an error.
@@ -952,7 +952,7 @@ public static <R> Completable using(Callable<R> resourceSupplier,
952952
* <p>
953953
* <img width="640" height="332" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.using.b.png" alt="">
954954
* <p>
955-
* If this overload performs a lazy cancellation after the terminal event is emitted.
955+
* If this overload performs a lazy disposal after the terminal event is emitted.
956956
* Exceptions thrown at this time will be delivered to RxJavaPlugins only.
957957
* <dl>
958958
* <dt><b>Scheduler:</b></dt>
@@ -1585,7 +1585,7 @@ public final Completable doAfterTerminate(final Action onAfterTerminate) {
15851585
* <dd>{@code doFinally} does not operate by default on a particular {@link Scheduler}.</dd>
15861586
* </dl>
15871587
* <p>History: 2.0.1 - experimental
1588-
* @param onFinally the action called when this Completable terminates or gets cancelled
1588+
* @param onFinally the action called when this Completable terminates or gets disposed
15891589
* @return the new Completable instance
15901590
* @since 2.1
15911591
*/
@@ -1852,7 +1852,7 @@ public final Completable onTerminateDetach() {
18521852
}
18531853

18541854
/**
1855-
* Returns a Completable that repeatedly subscribes to this Completable until cancelled.
1855+
* Returns a Completable that repeatedly subscribes to this Completable until disposed.
18561856
* <p>
18571857
* <img width="640" height="373" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.repeat.png" alt="">
18581858
* <dl>
@@ -2155,15 +2155,15 @@ public final Completable hide() {
21552155
}
21562156

21572157
/**
2158-
* Subscribes to this CompletableConsumable and returns a Disposable which can be used to cancel
2158+
* Subscribes to this CompletableConsumable and returns a Disposable which can be used to dispose
21592159
* the subscription.
21602160
* <p>
21612161
* <img width="640" height="352" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.subscribe.png" alt="">
21622162
* <dl>
21632163
* <dt><b>Scheduler:</b></dt>
21642164
* <dd>{@code subscribe} does not operate by default on a particular {@link Scheduler}.</dd>
21652165
* </dl>
2166-
* @return the Disposable that allows cancelling the subscription
2166+
* @return the Disposable that allows disposing the subscription
21672167
*/
21682168
@SchedulerSupport(SchedulerSupport.NONE)
21692169
public final Disposable subscribe() {
@@ -2245,7 +2245,7 @@ public final <E extends CompletableObserver> E subscribeWith(E observer) {
22452245
* </dl>
22462246
* @param onComplete the runnable that is called if the Completable completes normally
22472247
* @param onError the consumer that is called if this Completable emits an error
2248-
* @return the Disposable that can be used for cancelling the subscription asynchronously
2248+
* @return the Disposable that can be used for disposing the subscription asynchronously
22492249
* @throws NullPointerException if either callback is null
22502250
*/
22512251
@CheckReturnValue
@@ -2273,7 +2273,7 @@ public final Disposable subscribe(final Action onComplete, final Consumer<? supe
22732273
* <dd>{@code subscribe} does not operate by default on a particular {@link Scheduler}.</dd>
22742274
* </dl>
22752275
* @param onComplete the runnable called when this Completable completes normally
2276-
* @return the Disposable that allows cancelling the subscription
2276+
* @return the Disposable that allows disposing the subscription
22772277
*/
22782278
@CheckReturnValue
22792279
@SchedulerSupport(SchedulerSupport.NONE)
@@ -2583,15 +2583,15 @@ public final <T> Single<T> toSingleDefault(final T completionValue) {
25832583
}
25842584

25852585
/**
2586-
* Returns a Completable which makes sure when a subscriber cancels the subscription, the
2586+
* Returns a Completable which makes sure when a subscriber disposes the subscription, the
25872587
* dispose is called on the specified scheduler.
25882588
* <p>
25892589
* <img width="640" height="716" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.unsubscribeOn.png" alt="">
25902590
* <dl>
25912591
* <dt><b>Scheduler:</b></dt>
25922592
* <dd>{@code unsubscribeOn} calls dispose() of the upstream on the {@link Scheduler} you specify.</dd>
25932593
* </dl>
2594-
* @param scheduler the target scheduler where to execute the cancellation
2594+
* @param scheduler the target scheduler where to execute the disposing
25952595
* @return the new Completable instance
25962596
* @throws NullPointerException if scheduler is null
25972597
*/

0 commit comments

Comments
 (0)