@@ -11212,52 +11212,6 @@ public final <R> Flowable<R> lift(FlowableOperator<? extends R, ? super T> lifte
11212
11212
return RxJavaPlugins.onAssembly(new FlowableLift<R, T>(this, lifter));
11213
11213
}
11214
11214
11215
- /**
11216
- * Limits both the number of upstream items (after which the sequence completes)
11217
- * and the total downstream request amount requested from the upstream to
11218
- * possibly prevent the creation of excess items by the upstream.
11219
- * <p>
11220
- * The operator requests at most the given {@code count} of items from upstream even
11221
- * if the downstream requests more than that. For example, given a {@code limit(5)},
11222
- * if the downstream requests 1, a request of 1 is submitted to the upstream
11223
- * and the operator remembers that only 4 items can be requested now on. A request
11224
- * of 5 at this point will request 4 from the upstream and any subsequent requests will
11225
- * be ignored.
11226
- * <p>
11227
- * Note that requests are negotiated on an operator boundary and {@code limit}'s amount
11228
- * may not be preserved further upstream. For example,
11229
- * {@code source.observeOn(Schedulers.computation()).limit(5)} will still request the
11230
- * default (128) elements from the given {@code source}.
11231
- * <p>
11232
- * The main use of this operator is with sources that are async boundaries that
11233
- * don't interfere with request amounts, such as certain {@code Flowable}-based
11234
- * network endpoints that relay downstream request amounts unchanged and are, therefore,
11235
- * prone to trigger excessive item creation/transmission over the network.
11236
- * <dl>
11237
- * <dt><b>Backpressure:</b></dt>
11238
- * <dd>The operator requests a total of the given {@code count} items from the upstream.</dd>
11239
- * <dt><b>Scheduler:</b></dt>
11240
- * <dd>{@code limit} does not operate by default on a particular {@link Scheduler}.</dd>
11241
- * </dl>
11242
- * <p>History: 2.1.6 - experimental
11243
- * @param count the maximum number of items and the total request amount, non-negative.
11244
- * Zero will immediately cancel the upstream on subscription and complete
11245
- * the downstream.
11246
- * @return the new Flowable instance
11247
- * @see #take(long)
11248
- * @see #rebatchRequests(int)
11249
- * @since 2.2
11250
- */
11251
- @BackpressureSupport(BackpressureKind.SPECIAL)
11252
- @SchedulerSupport(SchedulerSupport.NONE)
11253
- @CheckReturnValue
11254
- public final Flowable<T> limit(long count) {
11255
- if (count < 0) {
11256
- throw new IllegalArgumentException("count >= 0 required but it was " + count);
11257
- }
11258
- return RxJavaPlugins.onAssembly(new FlowableLimit<T>(this, count));
11259
- }
11260
-
11261
11215
/**
11262
11216
* Returns a Flowable that applies a specified function to each item emitted by the source Publisher and
11263
11217
* emits the results of these function applications.
@@ -15383,9 +15337,7 @@ public final <R> Flowable<R> switchMapSingleDelayError(@NonNull Function<? super
15383
15337
* {@link Subscriber#onComplete onComplete}.
15384
15338
* <dl>
15385
15339
* <dt><b>Backpressure:</b></dt>
15386
- * <dd>The operator doesn't interfere with backpressure which is determined by the source {@code Publisher}'s backpressure
15387
- * behavior in case the first request is smaller than the {@code count}. Otherwise, the source {@code Publisher}
15388
- * is consumed in an unbounded manner (i.e., without applying backpressure to it).</dd>
15340
+ * <dd>The source {@code Publisher} is consumed in a bounded manner.</dd>
15389
15341
* <dt><b>Scheduler:</b></dt>
15390
15342
* <dd>This version of {@code take} does not operate by default on a particular {@link Scheduler}.</dd>
15391
15343
* </dl>
@@ -15397,7 +15349,7 @@ public final <R> Flowable<R> switchMapSingleDelayError(@NonNull Function<? super
15397
15349
* @see <a href="http://reactivex.io/documentation/operators/take.html">ReactiveX operators documentation: Take</a>
15398
15350
*/
15399
15351
@CheckReturnValue
15400
- @BackpressureSupport(BackpressureKind.SPECIAL) // may trigger UNBOUNDED_IN
15352
+ @BackpressureSupport(BackpressureKind.FULL)
15401
15353
@SchedulerSupport(SchedulerSupport.NONE)
15402
15354
public final Flowable<T> take(long count) {
15403
15355
if (count < 0) {
0 commit comments