Class RateLimiter<T>

java.lang.Object
io.activej.reactor.AbstractReactive
io.activej.reactor.ImplicitlyReactive
All Implemented Interfaces:
io.activej.async.process.AsyncCloseable, io.activej.async.process.ReactiveProcess, HasChannelInput<T>, HasChannelOutput<T>, WithChannelInput<RateLimiter<T>,T>, WithChannelOutput<RateLimiter<T>,T>, WithChannelTransformer<RateLimiter<T>,T,T>, ChannelConsumerTransformer<T,ChannelConsumer<T>>, ChannelSupplierTransformer<T,ChannelSupplier<T>>, ChannelTransformer<T,T>, io.activej.reactor.Reactive

public final class RateLimiter<T> extends AbstractChannelTransformer<RateLimiter<T>,T,T>
  • Field Details

    • refillRatePerMillis

      public final double refillRatePerMillis
    • tokens

      public double tokens
    • lastRefillTimestamp

      public long lastRefillTimestamp
    • tokenizer

      public RateLimiter.Tokenizer<T> tokenizer
    • scheduledRunnable

      @Nullable public @Nullable io.activej.reactor.schedule.ScheduledRunnable scheduledRunnable
  • Constructor Details

    • RateLimiter

      public RateLimiter(double refillRatePerMillis)
  • Method Details