MCPcopy Index your code
hub / github.com/ReactiveX/RxJava / PerfConsumer

Class PerfConsumer

src/jmh/java/io/reactivex/rxjava3/core/PerfConsumer.java:24–61  ·  view source on GitHub ↗

A multi-type synchronous consumer.

Source from the content-addressed store, hash-verified

22 * A multi-type synchronous consumer.
23 */
24public final class PerfConsumer implements FlowableSubscriber<Object>, Observer<Object>,
25SingleObserver<Object>, CompletableObserver, MaybeObserver<Object> {
26
27 final Blackhole bh;
28
29 public PerfConsumer(Blackhole bh) {
30 this.bh = bh;
31 }
32
33 @Override
34 public void onSuccess(Object value) {
35 bh.consume(value);
36 }
37
38 @Override
39 public void onSubscribe(Disposable d) {
40 }
41
42 @Override
43 public void onSubscribe(Subscription s) {
44 s.request(Long.MAX_VALUE);
45 }
46
47 @Override
48 public void onNext(Object t) {
49 bh.consume(t);
50 }
51
52 @Override
53 public void onError(Throwable t) {
54 t.printStackTrace();
55 }
56
57 @Override
58 public void onComplete() {
59 bh.consume(true);
60 }
61}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…