src/main/java/io/reactivex/Observable.java
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final ConnectableObservable<T> replay(final int bufferSize) {
        ObjectHelper.verifyPositive(bufferSize, "bufferSize");
        return ObservableReplay.create(this, bufferSize);
    }
@CheckReturnValue
    @SchedulerSupport(SchedulerSupport.NONE)
    public final ConnectableObservable<T> replay(final int bufferSize) {
        ObjectHelper.verifyPositive(bufferSize, "bufferSize");
        return ObservableReplay.create(this, bufferSize);
    }
Returns a {@link ConnectableObservable} that shares a single subscription to the source ObservableSource that
replays at most {@code bufferSize} items emitted by that ObservableSource. A Connectable ObservableSource resembles
an ordinary ObservableSource, except that it does not begin emitting items when it is subscribed to, but only
when its {@code connect} method is called.
<p>
Note that due to concurrency requirements, {@code replay(bufferSize)} may hold strong references to more than
{@code bufferSize} source emissions.
<p>
<img width="640" height="445" src="https://raw.github.com/wiki/ReactiveX/RxJava/images/rx-operators/replay.o.n.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 bufferSize
the buffer size that limits the number of items that can be replayed
@return a {@link ConnectableObservable} that shares a single subscription to the source ObservableSource and
replays at most {@code bufferSize} items emitted by that ObservableSource
@see <a href="http://reactivex.io/documentation/operators/replay.html">ReactiveX operators documentation: Replay</a>