src/main/java/io/reactivex/Single.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<T> retry(long times, Predicate<? super Throwable> predicate) {
        return toSingle(toFlowable().retry(times, predicate));
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final Single<T> retry(long times, Predicate<? super Throwable> predicate) {
        return toSingle(toFlowable().retry(times, predicate));
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . NONE ) public final Single < T > retry ( long times , Predicate < ? super Throwable > predicate ) { return toSingle ( toFlowable ( ) . retry ( times , predicate ) ) ; }
Repeatedly re-subscribe at most times or until the predicate returns false, whichever happens first
if it fails with an onError.
<dl>
<dt><b>Scheduler:</b></dt>
<dd>{@code retry} does not operate by default on a particular {@link Scheduler}.</dd>
</dl>
<p>History: 2.1.8 - experimental
@param times the number of times to resubscribe if the current Single fails
@param predicate the predicate called with the failure Throwable
and should return true if a resubscription should happen
@return the new Single instance
@since 2.2
Repeatedly re - subscribe at most times or until the predicate returns false whichever happens first if it fails with an onError . <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > {