Interface RateLimiter

All Known Implementing Classes:
DefaultRateLimiter

public interface RateLimiter
Ratelimiting for the REST API. The REST ratelimiter handles checking and updating ratelimits based on the bucket that the requested route is attempting to execute on.
  • Method Details

    • catnip

      void catnip(@Nonnull Catnip catnip)
    • requestExecution

      @Nonnull @CheckReturnValue io.reactivex.rxjava3.core.Completable requestExecution(@Nonnull Routes.Route route)
      Requests execution for a specific route. The route cannot be executed on until the bucket has requests available again, so the ratelimiter must handle this correctly.
      Parameters:
      route - The route to execute.
      Returns:
      A Completable that completes when the route can execute again.
    • updateRemaining

      void updateRemaining(@Nonnull Routes.Route route, int remaining)
    • updateLimit

      void updateLimit(@Nonnull Routes.Route route, int limit)
    • updateReset

      void updateReset(@Nonnull Routes.Route route, long resetTimestamp)
    • updateDone

      void updateDone(@Nonnull Routes.Route route)
    • updateGlobalRateLimit

      void updateGlobalRateLimit(long resetTimestamp)