public class StressSubscriber<T> extends java.lang.Object implements CoreSubscriber<T>
限定符和类型 | 字段和说明 |
---|---|
java.util.concurrent.atomic.AtomicBoolean |
concurrentOnComplete |
java.util.concurrent.atomic.AtomicBoolean |
concurrentOnError |
java.util.concurrent.atomic.AtomicBoolean |
concurrentOnNext |
java.util.concurrent.atomic.AtomicBoolean |
concurrentOnSubscribe |
java.util.List<T> |
discardedValues |
java.util.List<java.lang.Throwable> |
droppedErrors |
java.lang.Throwable |
error |
java.util.concurrent.atomic.AtomicReference<java.lang.Throwable> |
guard |
java.util.concurrent.atomic.AtomicInteger |
onCompleteCalls |
java.util.concurrent.atomic.AtomicInteger |
onErrorCalls |
java.util.concurrent.atomic.AtomicInteger |
onNextCalls |
java.util.concurrent.atomic.AtomicInteger |
onNextDiscarded |
java.util.concurrent.atomic.AtomicInteger |
onSubscribeCalls |
java.util.List<T> |
receivedValues |
java.lang.Throwable |
stacktraceOnComplete |
java.lang.Throwable |
stacktraceOnError |
java.lang.Throwable |
stacktraceOnNext |
java.lang.Throwable |
stacktraceOnSubscribe |
构造器和说明 |
---|
StressSubscriber()
Build a
StressSubscriber that makes an unbounded request upon subscription. |
StressSubscriber(long initRequest)
Build a
StressSubscriber that requests the provided amount in
onSubscribe(Subscription) . |
限定符和类型 | 方法和说明 |
---|---|
void |
cancel() |
Context |
currentContext()
Request a
Context from dependent components which can include downstream
operators during subscribing or a terminal Subscriber . |
void |
onComplete() |
void |
onError(java.lang.Throwable throwable) |
void |
onNext(T value) |
void |
onSubscribe(org.reactivestreams.Subscription subscription)
Implementors should initialize any state used by
Subscriber.onNext(Object) before
calling Subscription.request(long) . |
void |
request(long n) |
public java.lang.Throwable error
public java.util.List<java.lang.Throwable> droppedErrors
public java.util.concurrent.atomic.AtomicReference<java.lang.Throwable> guard
public java.util.concurrent.atomic.AtomicBoolean concurrentOnNext
public java.lang.Throwable stacktraceOnNext
public java.util.concurrent.atomic.AtomicBoolean concurrentOnError
public java.lang.Throwable stacktraceOnError
public java.util.concurrent.atomic.AtomicBoolean concurrentOnComplete
public java.lang.Throwable stacktraceOnComplete
public java.util.concurrent.atomic.AtomicBoolean concurrentOnSubscribe
public java.lang.Throwable stacktraceOnSubscribe
public final java.util.concurrent.atomic.AtomicInteger onNextCalls
public final java.util.List<T> receivedValues
public final java.util.concurrent.atomic.AtomicInteger onNextDiscarded
public final java.util.List<T> discardedValues
public final java.util.concurrent.atomic.AtomicInteger onErrorCalls
public final java.util.concurrent.atomic.AtomicInteger onCompleteCalls
public final java.util.concurrent.atomic.AtomicInteger onSubscribeCalls
public StressSubscriber()
StressSubscriber
that makes an unbounded request upon subscription.public StressSubscriber(long initRequest)
StressSubscriber
that requests the provided amount in
onSubscribe(Subscription)
. Use 0
to avoid any initial request
upon subscription.initRequest
- the requested amount upon subscription, or zero to disable initial requestpublic Context currentContext()
CoreSubscriber
Context
from dependent components which can include downstream
operators during subscribing or a terminal Subscriber
.currentContext
在接口中 CoreSubscriber<T>
Context.empty()
public void onSubscribe(org.reactivestreams.Subscription subscription)
CoreSubscriber
Subscriber.onNext(Object)
before
calling Subscription.request(long)
. Should further onNext
related
state modification occur, thread-safety will be required.
Note that an invalid request <= 0
will not produce an onError and
will simply be ignored or reported through a debug-enabled
Logger
.
onSubscribe
在接口中 org.reactivestreams.Subscriber<T>
onSubscribe
在接口中 CoreSubscriber<T>
public void onError(java.lang.Throwable throwable)
onError
在接口中 org.reactivestreams.Subscriber<T>
public void onComplete()
onComplete
在接口中 org.reactivestreams.Subscriber<T>
public void request(long n)
public void cancel()