Class NewRateLimitOperator<T>

  • Type Parameters:
    T - the type of the transformed sequence
    All Implemented Interfaces:
    Function<org.reactivestreams.Publisher<T>,​org.reactivestreams.Publisher<T>>

    public class NewRateLimitOperator<T>
    extends Object
    implements Function<org.reactivestreams.Publisher<T>,​org.reactivestreams.Publisher<T>>
    A rate limiting operator based off the token bucket algorithm. From Rate Limiting in rxjs.
    • Constructor Detail

      • NewRateLimitOperator

        public NewRateLimitOperator​(int capacity,
                                    Duration refillPeriod)
      • NewRateLimitOperator

        public NewRateLimitOperator​(int capacity,
                                    Duration refillPeriod,
                                    reactor.core.scheduler.Scheduler delayScheduler)
    • Method Detail

      • apply

        public org.reactivestreams.Publisher<T> apply​(org.reactivestreams.Publisher<T> source)
        Specified by:
        apply in interface Function<org.reactivestreams.Publisher<T>,​org.reactivestreams.Publisher<T>>