- java.lang.Object
-
- io.helidon.common.reactive.BaseProcessor<T,T>
-
- io.helidon.common.reactive.MultiFilterProcessor<T>
-
- io.helidon.common.reactive.MultiLimitProcessor<T>
-
- Type Parameters:
T- both input/output type
- All Implemented Interfaces:
Multi<T>,Subscribable<T>,Flow.Processor<T,T>,Flow.Publisher<T>,Flow.Subscriber<T>,Flow.Subscription
public class MultiLimitProcessor<T> extends MultiFilterProcessor<T>
Let pass only specified number of items.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> MultiLimitProcessor<T>create(Long limit)Processor with specified number of allowed items.protected voiddownstreamSubscribe()This is invoked when this processor is in a state when both upstream and downstream subscriptions have been set up.voidonError(Throwable ex)-
Methods inherited from class io.helidon.common.reactive.MultiFilterProcessor
create, next, setPredicate, submit
-
Methods inherited from class io.helidon.common.reactive.BaseProcessor
cancel, complete, complete, getError, getSubscriber, getSubscription, onComplete, onNext, onSubscribe, request, setError, subscribe
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.concurrent.Flow.Publisher
subscribe
-
Methods inherited from interface io.helidon.common.reactive.Multi
collect, collect, collectList, collectStream, defaultIfEmpty, distinct, dropWhile, filter, first, flatMap, flatMap, flatMapIterable, flatMapIterable, forEach, limit, map, onComplete, onError, onErrorResume, onErrorResumeWith, onTerminate, peek, reduce, reduce, skip, switchIfEmpty, takeUntil, takeWhile
-
Methods inherited from interface io.helidon.common.reactive.Subscribable
subscribe, subscribe, subscribe, subscribe
-
-
-
-
Method Detail
-
create
public static <T> MultiLimitProcessor<T> create(Long limit)
Processor with specified number of allowed items.- Type Parameters:
T- both input/output type- Parameters:
limit- number of items to pass- Returns:
MultiLimitProcessor
-
downstreamSubscribe
protected void downstreamSubscribe()
Description copied from class:BaseProcessorThis is invoked when this processor is in a state when both upstream and downstream subscriptions have been set up.- Overrides:
downstreamSubscribein classBaseProcessor<T,T>
-
onError
public void onError(Throwable ex)
- Specified by:
onErrorin interfaceFlow.Subscriber<T>- Overrides:
onErrorin classBaseProcessor<T,T>
-
-