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

    Constructors
    Constructor
    Description
    Throttle(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 Type
    Method
    Description
    static <T> BiFunction<io.vertx.core.eventbus.Message<T>,io.vertx.core.eventbus.Message<T>,io.vertx.core.eventbus.Message<T>>
     
    void
    handle(io.vertx.core.eventbus.Message<T> event)
     
    static <T> BiFunction<io.vertx.core.eventbus.Message<T>,io.vertx.core.eventbus.Message<T>,io.vertx.core.eventbus.Message<T>>
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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>,io.vertx.core.eventbus.Message<T>> lastAccumulator()
    • firstAccumulator

      public static <T> BiFunction<io.vertx.core.eventbus.Message<T>,io.vertx.core.eventbus.Message<T>,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>