Package org.aksw.commons.rx.op
Class OperatorObserveThroughput<T>
java.lang.Object
org.aksw.commons.rx.op.OperatorObserveThroughput<T>
- Type Parameters:
T-
- All Implemented Interfaces:
io.reactivex.rxjava3.core.FlowableOperator<T,T>
public class OperatorObserveThroughput<T>
extends Object
implements io.reactivex.rxjava3.core.FlowableOperator<T,T>
Operator that fires a callback every time it has seen a configurable number of items.
- Author:
- raven
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic class -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionOperatorObserveThroughput(String name, long interval, Consumer<OperatorObserveThroughput.ThroughputEvent> eventHandler) -
Method Summary
Modifier and TypeMethodDescriptionorg.reactivestreams.Subscriber<? super T>static <T> OperatorObserveThroughput<T>static <T> OperatorObserveThroughput<T>create(String name, long interval, Consumer<OperatorObserveThroughput.ThroughputEvent> eventHandler) static void
-
Field Details
-
name
-
interval
protected long interval -
eventHandler
-
-
Constructor Details
-
OperatorObserveThroughput
public OperatorObserveThroughput(String name, long interval, Consumer<OperatorObserveThroughput.ThroughputEvent> eventHandler)
-
-
Method Details
-
defaultThroughputEventHandler
-
create
-
create
public static <T> OperatorObserveThroughput<T> create(String name, long interval, Consumer<OperatorObserveThroughput.ThroughputEvent> eventHandler) -
apply
-