src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final <R> Observable<R> replay(final Function<? super Observable<T>, ? extends ObservableSource<R>> selector, final Scheduler scheduler) {
        ObjectHelper.requireNonNull(selector, "selector is null");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        return ObservableReplay.multicastSelector(ObservableInternalHelper.replayCallable(this),
                ObservableInternalHelper.replayFunction(selector, scheduler));
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final <R> Observable<R> replay(final Function<? super Observable<T>, ? extends ObservableSource<R>> selector, final Scheduler scheduler) {
        ObjectHelper.requireNonNull(selector, "selector is null");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        return ObservableReplay.multicastSelector(ObservableInternalHelper.replayCallable(this),
                ObservableInternalHelper.replayFunction(selector, scheduler));
    }
@ CheckReturnValue @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final < R > Observable < R > replay ( final Function < ? super Observable < T > , ? extends ObservableSource < R > > selector , final Scheduler scheduler ) { ObjectHelper . requireNonNull ( selector , "selector is null" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; return ObservableReplay . multicastSelector ( ObservableInternalHelper . replayCallable ( this ) , ObservableInternalHelper . replayFunction ( selector , scheduler ) ) ; }
Returns an Observable that emits items that are the results of invoking a specified selector on items
emitted by a {@link ConnectableObservable} that shares a single subscription to the source ObservableSource.
<p>
<img width="640" height="406" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.o.fs.png" alt="">
<dl>
<dt><b>Scheduler:</b></dt>
<dd>You specify which {@link Scheduler} this operator will use.</dd>
</dl>

@param <R>
the type of items emitted by the resulting ObservableSource
@param selector
a selector function, which can use the multicasted sequence as many times as needed, without
causing multiple subscriptions to the ObservableSource
@param scheduler
the Scheduler where the replay is observed
@return an Observable that emits items that are the results of invoking the selector on items emitted by
a {@link ConnectableObservable} that shares a single subscription to the source ObservableSource,
replaying all items
@see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
Returns an Observable that emits items that are the results of invoking a specified selector on items emitted by a { @link ConnectableObservable } that shares a single subscription to the source ObservableSource . <p > <img width = 640 height = 406 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / replay . o . fs . png alt = > <dl > <dt > <b > Scheduler : < / b > < / dt > <dd > You specify which { @link Scheduler } this operator will use . < / dd > < / dl >