Package com.slack.api.methods.impl
Class AsyncRateLimitQueue
- java.lang.Object
-
- com.slack.api.methods.impl.AsyncRateLimitQueue
-
public class AsyncRateLimitQueue extends Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends SlackApiResponse>
AsyncExecutionSupplier<T>dequeueIfReady(String messageId, String teamId, String methodName, Map<String,String> params)<T extends SlackApiResponse>
voidenqueue(String messageId, String teamId, String methodName, Map<String,String> params, AsyncExecutionSupplier<T> methodsSupplier)static AsyncRateLimitQueueget(String executorName, String teamId)IntegergetCurrentActiveQueueSize(String methodNameWithSuffix)static AsyncRateLimitQueuegetOrCreate(MethodsConfig config, String teamId)AsyncMethodsRateLimitergetRateLimiter()voidremove(String methodName, String messageId)voidsetRateLimiter(AsyncMethodsRateLimiter rateLimiter)
-
-
-
Method Detail
-
getRateLimiter
public AsyncMethodsRateLimiter getRateLimiter()
-
setRateLimiter
public void setRateLimiter(AsyncMethodsRateLimiter rateLimiter)
-
get
public static AsyncRateLimitQueue get(String executorName, String teamId)
-
getOrCreate
public static AsyncRateLimitQueue getOrCreate(MethodsConfig config, String teamId)
-
enqueue
public <T extends SlackApiResponse> void enqueue(String messageId, String teamId, String methodName, Map<String,String> params, AsyncExecutionSupplier<T> methodsSupplier) throws InterruptedException
- Throws:
InterruptedException
-
dequeueIfReady
public <T extends SlackApiResponse> AsyncExecutionSupplier<T> dequeueIfReady(String messageId, String teamId, String methodName, Map<String,String> params)
-
-