|
90 | 90 | * d.dispose();
|
91 | 91 | * </code></pre>
|
92 | 92 | * <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 |
94 | 94 | * from the outside (hence the
|
95 | 95 | * {@code void} return of the {@link #subscribe(CompletableObserver)} method) and it is the
|
96 | 96 | * responsibility of the implementor of the {@code CompletableObserver} to allow this to happen.
|
|
105 | 105 | public abstract class Completable implements CompletableSource {
|
106 | 106 | /**
|
107 | 107 | * 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. |
109 | 109 | * <p>
|
110 | 110 | * <img width="640" height="518" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.ambArray.png" alt="">
|
111 | 111 | * <dl>
|
@@ -133,7 +133,7 @@ public static Completable ambArray(final CompletableSource... sources) {
|
133 | 133 |
|
134 | 134 | /**
|
135 | 135 | * 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. |
137 | 137 | * <p>
|
138 | 138 | * <img width="640" height="518" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.amb.png" alt="">
|
139 | 139 | * <dl>
|
@@ -306,7 +306,7 @@ public static Completable create(CompletableOnSubscribe source) {
|
306 | 306 | /**
|
307 | 307 | * Constructs a Completable instance by wrapping the given source callback
|
308 | 308 | * <strong>without any safeguards; you should manage the lifecycle and response
|
309 |
| - * to downstream cancellation/dispose</strong>. |
| 309 | + * to downstream disposal</strong>. |
310 | 310 | * <p>
|
311 | 311 | * <img width="640" height="260" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.unsafeCreate.png" alt="">
|
312 | 312 | * <dl>
|
@@ -446,7 +446,7 @@ public static Completable fromCallable(final Callable<?> callable) {
|
446 | 446 | * <p>
|
447 | 447 | * <img width="640" height="628" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.fromFuture.png" alt="">
|
448 | 448 | * <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. |
450 | 450 | * <dl>
|
451 | 451 | * <dt><b>Scheduler:</b></dt>
|
452 | 452 | * <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) {
|
594 | 594 | * <dd>{@code mergeArray} does not operate by default on a particular {@link Scheduler}.</dd>
|
595 | 595 | * <dt><b>Error handling:</b></dt>
|
596 | 596 | * <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. |
598 | 598 | * If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
|
599 | 599 | * first one's error or, depending on the concurrency of the sources, may terminate with a
|
600 | 600 | * {@code CompositeException} containing two or more of the various error signals.
|
601 | 601 | * {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
|
602 | 602 | * {@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 |
604 | 604 | * (composite) error will be sent to the same global error handler.
|
605 | 605 | * Use {@link #mergeArrayDelayError(CompletableSource...)} to merge sources and terminate only when all source {@code CompletableSource}s
|
606 | 606 | * have completed or failed with an error.
|
@@ -634,13 +634,13 @@ public static Completable mergeArray(CompletableSource... sources) {
|
634 | 634 | * <dd>{@code merge} does not operate by default on a particular {@link Scheduler}.</dd>
|
635 | 635 | * <dt><b>Error handling:</b></dt>
|
636 | 636 | * <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. |
638 | 638 | * If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
|
639 | 639 | * first one's error or, depending on the concurrency of the sources, may terminate with a
|
640 | 640 | * {@code CompositeException} containing two or more of the various error signals.
|
641 | 641 | * {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
|
642 | 642 | * {@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 |
644 | 644 | * (composite) error will be sent to the same global error handler.
|
645 | 645 | * Use {@link #mergeDelayError(Iterable)} to merge sources and terminate only when all source {@code CompletableSource}s
|
646 | 646 | * have completed or failed with an error.
|
@@ -671,13 +671,13 @@ public static Completable merge(Iterable<? extends CompletableSource> sources) {
|
671 | 671 | * <dd>{@code merge} does not operate by default on a particular {@link Scheduler}.</dd>
|
672 | 672 | * <dt><b>Error handling:</b></dt>
|
673 | 673 | * <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. |
675 | 675 | * If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
|
676 | 676 | * first one's error or, depending on the concurrency of the sources, may terminate with a
|
677 | 677 | * {@code CompositeException} containing two or more of the various error signals.
|
678 | 678 | * {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
|
679 | 679 | * {@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 |
681 | 681 | * (composite) error will be sent to the same global error handler.
|
682 | 682 | * Use {@link #mergeDelayError(Publisher)} to merge sources and terminate only when all source {@code CompletableSource}s
|
683 | 683 | * have completed or failed with an error.
|
@@ -708,13 +708,13 @@ public static Completable merge(Publisher<? extends CompletableSource> sources)
|
708 | 708 | * <dd>{@code merge} does not operate by default on a particular {@link Scheduler}.</dd>
|
709 | 709 | * <dt><b>Error handling:</b></dt>
|
710 | 710 | * <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. |
712 | 712 | * If more than one {@code CompletableSource} signals an error, the resulting {@code Completable} may terminate with the
|
713 | 713 | * first one's error or, depending on the concurrency of the sources, may terminate with a
|
714 | 714 | * {@code CompositeException} containing two or more of the various error signals.
|
715 | 715 | * {@code Throwable}s that didn't make into the composite will be sent (individually) to the global error handler via
|
716 | 716 | * {@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 |
718 | 718 | * (composite) error will be sent to the same global error handler.
|
719 | 719 | * Use {@link #mergeDelayError(Publisher, int)} to merge sources and terminate only when all source {@code CompletableSource}s
|
720 | 720 | * have completed or failed with an error.
|
@@ -952,7 +952,7 @@ public static <R> Completable using(Callable<R> resourceSupplier,
|
952 | 952 | * <p>
|
953 | 953 | * <img width="640" height="332" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.using.b.png" alt="">
|
954 | 954 | * <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. |
956 | 956 | * Exceptions thrown at this time will be delivered to RxJavaPlugins only.
|
957 | 957 | * <dl>
|
958 | 958 | * <dt><b>Scheduler:</b></dt>
|
@@ -1585,7 +1585,7 @@ public final Completable doAfterTerminate(final Action onAfterTerminate) {
|
1585 | 1585 | * <dd>{@code doFinally} does not operate by default on a particular {@link Scheduler}.</dd>
|
1586 | 1586 | * </dl>
|
1587 | 1587 | * <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 |
1589 | 1589 | * @return the new Completable instance
|
1590 | 1590 | * @since 2.1
|
1591 | 1591 | */
|
@@ -1852,7 +1852,7 @@ public final Completable onTerminateDetach() {
|
1852 | 1852 | }
|
1853 | 1853 |
|
1854 | 1854 | /**
|
1855 |
| - * Returns a Completable that repeatedly subscribes to this Completable until cancelled. |
| 1855 | + * Returns a Completable that repeatedly subscribes to this Completable until disposed. |
1856 | 1856 | * <p>
|
1857 | 1857 | * <img width="640" height="373" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.repeat.png" alt="">
|
1858 | 1858 | * <dl>
|
@@ -2155,15 +2155,15 @@ public final Completable hide() {
|
2155 | 2155 | }
|
2156 | 2156 |
|
2157 | 2157 | /**
|
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 |
2159 | 2159 | * the subscription.
|
2160 | 2160 | * <p>
|
2161 | 2161 | * <img width="640" height="352" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.subscribe.png" alt="">
|
2162 | 2162 | * <dl>
|
2163 | 2163 | * <dt><b>Scheduler:</b></dt>
|
2164 | 2164 | * <dd>{@code subscribe} does not operate by default on a particular {@link Scheduler}.</dd>
|
2165 | 2165 | * </dl>
|
2166 |
| - * @return the Disposable that allows cancelling the subscription |
| 2166 | + * @return the Disposable that allows disposing the subscription |
2167 | 2167 | */
|
2168 | 2168 | @SchedulerSupport(SchedulerSupport.NONE)
|
2169 | 2169 | public final Disposable subscribe() {
|
@@ -2245,7 +2245,7 @@ public final <E extends CompletableObserver> E subscribeWith(E observer) {
|
2245 | 2245 | * </dl>
|
2246 | 2246 | * @param onComplete the runnable that is called if the Completable completes normally
|
2247 | 2247 | * @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 |
2249 | 2249 | * @throws NullPointerException if either callback is null
|
2250 | 2250 | */
|
2251 | 2251 | @CheckReturnValue
|
@@ -2273,7 +2273,7 @@ public final Disposable subscribe(final Action onComplete, final Consumer<? supe
|
2273 | 2273 | * <dd>{@code subscribe} does not operate by default on a particular {@link Scheduler}.</dd>
|
2274 | 2274 | * </dl>
|
2275 | 2275 | * @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 |
2277 | 2277 | */
|
2278 | 2278 | @CheckReturnValue
|
2279 | 2279 | @SchedulerSupport(SchedulerSupport.NONE)
|
@@ -2583,15 +2583,15 @@ public final <T> Single<T> toSingleDefault(final T completionValue) {
|
2583 | 2583 | }
|
2584 | 2584 |
|
2585 | 2585 | /**
|
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 |
2587 | 2587 | * dispose is called on the specified scheduler.
|
2588 | 2588 | * <p>
|
2589 | 2589 | * <img width="640" height="716" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/Completable.unsubscribeOn.png" alt="">
|
2590 | 2590 | * <dl>
|
2591 | 2591 | * <dt><b>Scheduler:</b></dt>
|
2592 | 2592 | * <dd>{@code unsubscribeOn} calls dispose() of the upstream on the {@link Scheduler} you specify.</dd>
|
2593 | 2593 | * </dl>
|
2594 |
| - * @param scheduler the target scheduler where to execute the cancellation |
| 2594 | + * @param scheduler the target scheduler where to execute the disposing |
2595 | 2595 | * @return the new Completable instance
|
2596 | 2596 | * @throws NullPointerException if scheduler is null
|
2597 | 2597 | */
|
|
0 commit comments