public class ConditionalStressSubscriber<T> extends StressSubscriber<T> implements Fuseable.ConditionalSubscriber<T>
concurrentOnComplete, concurrentOnError, concurrentOnNext, concurrentOnSubscribe, discardedValues, droppedErrors, error, guard, onCompleteCalls, onErrorCalls, onNextCalls, onNextDiscarded, onSubscribeCalls, receivedValues, stacktraceOnComplete, stacktraceOnError, stacktraceOnNext, stacktraceOnSubscribe
构造器和说明 |
---|
ConditionalStressSubscriber()
Build a
ConditionalStressSubscriber that makes an unbounded request upon subscription. |
ConditionalStressSubscriber(long initRequest)
Build a
ConditionalStressSubscriber that requests the provided amount in
StressSubscriber.onSubscribe(Subscription) . |
ConditionalStressSubscriber(long initRequest,
java.util.function.Predicate<T> tryOnNextPredicate)
Build a
ConditionalStressSubscriber that requests the provided amount in
StressSubscriber.onSubscribe(Subscription) . |
ConditionalStressSubscriber(java.util.function.Predicate<T> tryOnNextPredicate)
Build a
ConditionalStressSubscriber that that makes an unbounded request upon
subscription. |
限定符和类型 | 方法和说明 |
---|---|
boolean |
tryOnNext(T value)
Try consuming the value and return true if successful.
|
cancel, currentContext, onComplete, onError, onNext, onSubscribe, request
currentContext, onSubscribe
public ConditionalStressSubscriber()
ConditionalStressSubscriber
that makes an unbounded request upon subscription.public ConditionalStressSubscriber(java.util.function.Predicate<T> tryOnNextPredicate)
ConditionalStressSubscriber
that that makes an unbounded request upon
subscription.tryOnNextPredicate
- the tryOnNext predicatepublic ConditionalStressSubscriber(long initRequest)
ConditionalStressSubscriber
that requests the provided amount in
StressSubscriber.onSubscribe(Subscription)
. Use 0
to avoid any initial request
upon subscription.initRequest
- the requested amount upon subscription, or zero to disable initial requestpublic ConditionalStressSubscriber(long initRequest, java.util.function.Predicate<T> tryOnNextPredicate)
ConditionalStressSubscriber
that requests the provided amount in
StressSubscriber.onSubscribe(Subscription)
. Use 0
to avoid any initial request
upon subscription.initRequest
- the requested amount upon subscription, or zero to disable initial requesttryOnNextPredicate
- the tryOnNext predicatepublic boolean tryOnNext(T value)
Fuseable.ConditionalSubscriber
tryOnNext
在接口中 Fuseable.ConditionalSubscriber<T>
value
- the value to consume, not null