Package org.javacord.api.util.ratelimit
Interface Ratelimiter
-
- All Known Implementing Classes:
LocalRatelimiter
public interface RatelimiterCan be used to implement ratelimits.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidrequestQuota()Blocks the requesting thread until a quota becomes available.
-
-
-
Method Detail
-
requestQuota
void requestQuota() throws InterruptedExceptionBlocks the requesting thread until a quota becomes available.- Throws:
InterruptedException- if any thread has interrupted the current thread. The interrupted status of the current thread is cleared when this exception is thrown.
-
-