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

@param <R>
the type of items emitted by the resulting ObservableSource
@param selector
the selector function, which can use the multicasted sequence as many times as needed, without
causing multiple subscriptions to the ObservableSource
@return an Observable that emits items that are the results of invoking the selector on a
{@link ConnectableObservable} that shares a single subscription to the source ObservableSource
@see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>