src/main/java/io/reactivex/internal/operators/flowable/FlowablePublish.java
public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) {
        // the current connection to source needs to be shared between the operator and its onSubscribe call
        final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>();
        Publisher<T> onSubscribe = new FlowablePublisher<T>(curr, bufferSize);
        return RxJavaPlugins.onAssembly(new FlowablePublish<T>(onSubscribe, source, curr, bufferSize));
    }
public static <T> ConnectableFlowable<T> create(Flowable<T> source, final int bufferSize) {
        // the current connection to source needs to be shared between the operator and its onSubscribe call
        final AtomicReference<PublishSubscriber<T>> curr = new AtomicReference<PublishSubscriber<T>>();
        Publisher<T> onSubscribe = new FlowablePublisher<T>(curr, bufferSize);
        return RxJavaPlugins.onAssembly(new FlowablePublish<T>(onSubscribe, source, curr, bufferSize));
    }
public static < T > ConnectableFlowable < T > create ( Flowable < T > source , final int bufferSize ) { // the current connection to source needs to be shared between the operator and its onSubscribe call final AtomicReference < PublishSubscriber < T > > curr = new AtomicReference < PublishSubscriber < T > > ( ) ; Publisher < T > onSubscribe = new FlowablePublisher < T > ( curr , bufferSize ) ; return RxJavaPlugins . onAssembly ( new FlowablePublish < T > ( onSubscribe , source , curr , bufferSize ) ) ; }
Creates a OperatorPublish instance to publish values of the given source observable.
@param <T> the source value type
@param source the source observable
@param bufferSize the size of the prefetch buffer
@return the connectable observable
Creates a OperatorPublish instance to publish values of the given source observable .