Skip to content

Commit 26a8642

Browse files
committed
Update the timeout docs
1 parent 1a86347 commit 26a8642

File tree

2 files changed

+28
-7
lines changed

2 files changed

+28
-7
lines changed

rxjava-core/src/main/java/rx/Observable.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7744,9 +7744,9 @@ public final Observable<TimeInterval<T>> timeInterval(Scheduler scheduler) {
77447744
}
77457745

77467746
/**
7747-
* Returns an Observable that completes if either the first item emitted by the source
7748-
* Observable or any subsequent item don't arrive within time windows defined by other
7749-
* Observables.
7747+
* Returns an Observable that mirrors the source Observable, but emits a TimeoutException
7748+
* if either the first item emitted by the source Observable or any subsequent item
7749+
* don't arrive within time windows defined by other Observables.
77507750
* <p>
77517751
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/timeout5.png">
77527752
*
@@ -7799,16 +7799,16 @@ public final <U, V> Observable<T> timeout(Func0<? extends Observable<U>> firstTi
77997799
}
78007800

78017801
/**
7802-
* Returns an Observable that mirrors the source Observable, but completes if an item emitted by
7802+
* Returns an Observable that mirrors the source Observable, but emits a TimeoutException if an item emitted by
78037803
* the source Observable doesn't arrive within a window of time after the emission of the
78047804
* previous item, where that period of time is measured by an Observable that is a function
78057805
* of the previous item.
78067806
* <p>
78077807
* <img width="640" src="https://raw.github.com/wiki/Netflix/RxJava/images/rx-operators/timeout3.png">
78087808
* <p>
7809-
* The arrival of the first source item is never timed out.
7809+
* Note: The arrival of the first source item is never timed out.
78107810
*
7811-
* @param <U>
7811+
* @param <V>
78127812
* the timeout value type (ignored)
78137813
* @param timeoutSelector
78147814
* a function that returns an observable for each item emitted by the source
@@ -7831,7 +7831,7 @@ public final <V> Observable<T> timeout(Func1<? super T, ? extends Observable<V>>
78317831
* <p>
78327832
* The arrival of the first source item is never timed out.
78337833
*
7834-
* @param <U>
7834+
* @param <V>
78357835
* the timeout value type (ignored)
78367836
* @param timeoutSelector
78377837
* a function that returns an observable for each item emitted by the source

rxjava-core/src/main/java/rx/operators/OperatorTimeoutWithSelector.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,18 @@
1+
/**
2+
* Copyright 2014 Netflix, Inc.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
116
package rx.operators;
217

318
import rx.Observable;
@@ -8,6 +23,12 @@
823
import rx.util.functions.Func0;
924
import rx.util.functions.Func1;
1025

26+
/**
27+
* Returns an Observable that mirrors the source Observable. If either the first
28+
* item emitted by the source Observable or any subsequent item don't arrive
29+
* within time windows defined by provided Observables, switch to the
30+
* <code>other</code> Observable if provided, or emit a TimeoutException .
31+
*/
1132
public class OperatorTimeoutWithSelector<T, U, V> extends
1233
OperatorTimeoutBase<T> {
1334

0 commit comments

Comments
 (0)