src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> retry() {
        return retry(Long.MAX_VALUE, Functions.alwaysTrue());
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Observable<T> retry() {
        return retry(Long.MAX_VALUE, Functions.alwaysTrue());
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Observable < T > retry ( ) { return retry ( Long . MAX_VALUE , Functions . alwaysTrue ( ) ) ; }
Returns an Observable that mirrors the source ObservableSource, resubscribing to it if it calls {@code onError}
(infinite retry count).
<p>
<img width="640" height="315" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/retry.png" alt="">
<p>
If the source ObservableSource calls {@link Observer#onError}, this method will resubscribe to the source
ObservableSource rather than propagating the {@code onError} call.
<p>
Any and all items emitted by the source ObservableSource will be emitted by the resulting ObservableSource, even
those emitted during failed subscriptions. For example, if an ObservableSource fails at first but emits
{@code [1, 2]} then succeeds the second time and emits {@code [1, 2, 3, 4, 5]} then the complete sequence
of emissions and notifications would be {@code [1, 2, 1, 2, 3, 4, 5, onComplete]}.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code retry} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>

@return the source ObservableSource modified with retry logic
@see <a href="http://reactivex.io/documentation/operators/retry.html">ReactiveX operators documentation: Retry</a>
Returns an Observable that mirrors the source ObservableSource resubscribing to it if it calls { @code onError } ( infinite retry count ) . <p > <img width = 640 height = 315 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / retry . png alt = > <p > If the source ObservableSource calls { @link Observer#onError } this method will resubscribe to the source ObservableSource rather than propagating the { @code onError } call . <p > Any and all items emitted by the source ObservableSource will be emitted by the resulting ObservableSource even those emitted during failed subscriptions . For example if an ObservableSource fails at first but emits { @code [ 1 2 ] } then succeeds the second time and emits { @code [ 1 2 3 4 5 ] } then the complete sequence of emissions and notifications would be { @code [ 1 2 1 2 3 4 5 onComplete ] } . <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > { @code retry } does not operate by default on a particular { @link Scheduler } . < / dd > < / dl >