@ CheckReturnValue @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . NONE ) public final Flowable < T > retry ( long times , Predicate < ? super Throwable > predicate ) { if ( times < 0 ) { throw new IllegalArgumentException ( "times >= 0 required but it was " + times ) ; } ObjectHelper . requireNonNull ( predicate , "predicate is null" ) ; return RxJavaPlugins . onAssembly ( new FlowableRetryPredicate < T > ( this , times , predicate ) ) ; }
Retries at most times or until the predicate returns false whichever happens first .