Package net.bluemind.lib.vertx.utils
Class Throttle<T>
java.lang.Object
net.bluemind.lib.vertx.utils.Throttle<T>
- All Implemented Interfaces:
io.vertx.core.Handler<io.vertx.core.eventbus.Message<T>>
public class Throttle<T>
extends Object
implements io.vertx.core.Handler<io.vertx.core.eventbus.Message<T>>
-
Constructor Summary
ConstructorDescriptionThrottle
(io.vertx.core.Handler<io.vertx.core.eventbus.Message<T>> wrappedHandler, io.vertx.core.Vertx vertx, int throttleTimeInMs) Throttle
(io.vertx.core.Handler<io.vertx.core.eventbus.Message<T>> wrappedHandler, BiFunction<io.vertx.core.eventbus.Message<T>, io.vertx.core.eventbus.Message<T>, io.vertx.core.eventbus.Message<T>> accu, io.vertx.core.Vertx vertx, IntSupplier throttleTimeInMs) -
Method Summary
Modifier and TypeMethodDescriptionstatic <T> BiFunction
<io.vertx.core.eventbus.Message<T>, io.vertx.core.eventbus.Message<T>, io.vertx.core.eventbus.Message<T>> void
static <T> BiFunction
<io.vertx.core.eventbus.Message<T>, io.vertx.core.eventbus.Message<T>, io.vertx.core.eventbus.Message<T>>
-
Constructor Details
-
Throttle
public Throttle(io.vertx.core.Handler<io.vertx.core.eventbus.Message<T>> wrappedHandler, BiFunction<io.vertx.core.eventbus.Message<T>, io.vertx.core.eventbus.Message<T>, io.vertx.core.eventbus.Message<T>> accu, io.vertx.core.Vertx vertx, IntSupplier throttleTimeInMs) -
Throttle
public Throttle(io.vertx.core.Handler<io.vertx.core.eventbus.Message<T>> wrappedHandler, io.vertx.core.Vertx vertx, int throttleTimeInMs)
-
-
Method Details
-
lastAccumulator
public static <T> BiFunction<io.vertx.core.eventbus.Message<T>,io.vertx.core.eventbus.Message<T>, lastAccumulator()io.vertx.core.eventbus.Message<T>> -
firstAccumulator
public static <T> BiFunction<io.vertx.core.eventbus.Message<T>,io.vertx.core.eventbus.Message<T>, firstAccumulator()io.vertx.core.eventbus.Message<T>> -
handle
- Specified by:
handle
in interfaceio.vertx.core.Handler<T>
-