public final Flux<T> refCount(int minSubscribers, Duration gracePeriod, Scheduler scheduler) {
    """
	Connects to the upstream source when the given number of {@link org.reactivestreams.Subscriber} subscribes.
	Disconnection can happen in two scenarios: when the upstream source completes (or errors) then
	there is an immediate disconnection. However, when all subscribers have cancelled,
	a <strong>deferred</strong> disconnection is scheduled. If any new subscriber comes
	in during the {@code gracePeriod} that follows, the disconnection is cancelled.
	
	<p>
	<img class="marble" src="doc-files/marbles/refCountWithMinSubscribersAndGracePeriod.svg" alt="">
	
	@param minSubscribers the number of subscribers expected to subscribe before connection
	@param gracePeriod the {@link Duration} for which to wait for new subscribers before actually
	disconnecting when all subscribers have cancelled.
	@param scheduler the {@link Scheduler} on which to run timeouts
	
	@return a reference counting {@link Flux} with a grace period for disconnection
    """
		return onAssembly(new FluxRefCountGrace<>(this, minSubscribers, gracePeriod, scheduler));
	}
public final Flux<T> refCount(int minSubscribers, Duration gracePeriod, Scheduler scheduler) {
		return onAssembly(new FluxRefCountGrace<>(this, minSubscribers, gracePeriod, scheduler));
	}
public final Flux < T > refCount ( int minSubscribers , Duration gracePeriod , Scheduler scheduler ) { return onAssembly ( new FluxRefCountGrace <> ( this , minSubscribers , gracePeriod , scheduler ) ) ; }
Connects to the upstream source when the given number of {@link org.reactivestreams.Subscriber} subscribes.
Disconnection can happen in two scenarios: when the upstream source completes (or errors) then
there is an immediate disconnection. However, when all subscribers have cancelled,
a <strong>deferred</strong> disconnection is scheduled. If any new subscriber comes
in during the {@code gracePeriod} that follows, the disconnection is cancelled.

<p>
<img class="marble" src="doc-files/marbles/refCountWithMinSubscribersAndGracePeriod.svg" alt="">

@param minSubscribers the number of subscribers expected to subscribe before connection
@param gracePeriod the {@link Duration} for which to wait for new subscribers before actually
disconnecting when all subscribers have cancelled.
@param scheduler the {@link Scheduler} on which to run timeouts

@return a reference counting {@link Flux} with a grace period for disconnection
Connects to the upstream source when the given number of { @link org . reactivestreams . Subscriber } subscribes . Disconnection can happen in two scenarios : when the upstream source completes ( or errors ) then there is an immediate disconnection . However when all subscribers have cancelled a <strong > deferred< / strong > disconnection is scheduled . If any new subscriber comes in during the { @code gracePeriod } that follows the disconnection is cancelled .