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 Details

    • Throttle

      public Throttle(io.vertx.core.Handler<io.vertx.core.eventbus.Message<T>> wrappedHandler, BinaryOperator<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> BinaryOperator<io.vertx.core.eventbus.Message<T>> lastAccumulator()
    • firstAccumulator

      public static <T> BinaryOperator<io.vertx.core.eventbus.Message<T>> firstAccumulator()
    • handle

      public void handle(io.vertx.core.eventbus.Message<T> event)
      Specified by:
      handle in interface io.vertx.core.Handler<T>