src/main/java/io/reactivex/Flowable.java
@CheckReturnValue
    @NonNull
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final <R> Flowable<R> replay(final Function<? super Flowable<T>, ? extends Publisher<R>> selector, final Scheduler scheduler) {
        ObjectHelper.requireNonNull(selector, "selector is null");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        return FlowableReplay.multicastSelector(FlowableInternalHelper.replayCallable(this),
                FlowableInternalHelper.replayFunction(selector, scheduler));
    }
@CheckReturnValue
    @NonNull
    @BackpressureSupport(BackpressureKind.FULL)
    @SchedulerSupport(SchedulerSupport.CUSTOM)
    public final <R> Flowable<R> replay(final Function<? super Flowable<T>, ? extends Publisher<R>> selector, final Scheduler scheduler) {
        ObjectHelper.requireNonNull(selector, "selector is null");
        ObjectHelper.requireNonNull(scheduler, "scheduler is null");
        return FlowableReplay.multicastSelector(FlowableInternalHelper.replayCallable(this),
                FlowableInternalHelper.replayFunction(selector, scheduler));
    }
@ CheckReturnValue @ NonNull @ BackpressureSupport ( BackpressureKind . FULL ) @ SchedulerSupport ( SchedulerSupport . CUSTOM ) public final < R > Flowable < R > replay ( final Function < ? super Flowable < T > , ? extends Publisher < R > > selector , final Scheduler scheduler ) { ObjectHelper . requireNonNull ( selector , "selector is null" ) ; ObjectHelper . requireNonNull ( scheduler , "scheduler is null" ) ; return FlowableReplay . multicastSelector ( FlowableInternalHelper . replayCallable ( this ) , FlowableInternalHelper . replayFunction ( selector , scheduler ) ) ; }
Returns a Flowable that emits items that are the results of invoking a specified selector on items
emitted by a {@link ConnectableFlowable} that shares a single subscription to the source Publisher.
<p>
<img width="640" height="445" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.fs.png" alt="">
<dl>
<dt><b>Backpressure:</b></dt>
<dd>This operator supports backpressure. Note that the upstream requests are determined by the child
Subscriber which requests the largest amount: i.e., two child Subscribers with requests of 10 and 100 will
request 100 elements from the underlying Publisher sequence.</dd>
<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 Publisher
@param selector
a selector function, which can use the multicasted sequence as many times as needed, without
causing multiple subscriptions to the Publisher
@param scheduler
the Scheduler where the replay is observed
@return a Flowable that emits items that are the results of invoking the selector on items emitted by
a {@link ConnectableFlowable} that shares a single subscription to the source Publisher,
replaying all items
@see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>
Returns a Flowable that emits items that are the results of invoking a specified selector on items emitted by a { @link ConnectableFlowable } that shares a single subscription to the source Publisher . <p > <img width = 640 height = 445 src = https : // raw . github . com / wiki / ReactiveX / RxJava / images / rx - operators / replay . fs . png alt = > <dl > <dt > <b > Backpressure : < / b > < / dt > <dd > This operator supports backpressure . Note that the upstream requests are determined by the child Subscriber which requests the largest amount : i . e . two child Subscribers with requests of 10 and 100 will request 100 elements from the underlying Publisher sequence . < / dd > <dt > <b > Scheduler : < / b > < / dt > <dd > You specify which { @link Scheduler } this operator will use . < / dd > < / dl >