Class BaseRedisMetricsDatastore<SUPPLIER,MSG extends QueueMessage>
java.lang.Object
com.slack.api.rate_limits.metrics.impl.BaseRedisMetricsDatastore<SUPPLIER,MSG>
- All Implemented Interfaces:
MetricsDatastore,AutoCloseable
- Direct Known Subclasses:
RedisMetricsDatastore,RedisMetricsDatastore,RedisMetricsDatastore
public abstract class BaseRedisMetricsDatastore<SUPPLIER,MSG extends QueueMessage> extends Object implements MetricsDatastore, AutoCloseable
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classBaseRedisMetricsDatastore.MaintenanceJob -
Field Summary
Fields inherited from interface com.slack.api.rate_limits.metrics.MetricsDatastore
DEFAULT_SINGLETON_EXECUTOR_NAME -
Constructor Summary
Constructors Constructor Description BaseRedisMetricsDatastore(String appName, redis.clients.jedis.JedisPool jedisPool) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.slack.api.rate_limits.metrics.MetricsDatastore
getNumberOfNodes, getStats
-
Constructor Details
-
Method Details
-
getRateLimitQueue
public abstract RateLimitQueue<SUPPLIER,MSG> getRateLimitQueue(String executorName, String teamId) -
jedis
public redis.clients.jedis.Jedis jedis() -
close
- Specified by:
closein interfaceAutoCloseable- Throws:
Exception
-
getThreadGroupName
-
getAllStats
- Specified by:
getAllStatsin interfaceMetricsDatastore
-
getStats
- Specified by:
getStatsin interfaceMetricsDatastore
-
incrementAllCompletedCalls
- Specified by:
incrementAllCompletedCallsin interfaceMetricsDatastore
-
incrementSuccessfulCalls
- Specified by:
incrementSuccessfulCallsin interfaceMetricsDatastore
-
incrementUnsuccessfulCalls
- Specified by:
incrementUnsuccessfulCallsin interfaceMetricsDatastore
-
incrementFailedCalls
- Specified by:
incrementFailedCallsin interfaceMetricsDatastore
-
updateCurrentQueueSize
- Specified by:
updateCurrentQueueSizein interfaceMetricsDatastore
-
setCurrentQueueSize
public void setCurrentQueueSize(String executorName, String teamId, String methodName, Integer value)- Specified by:
setCurrentQueueSizein interfaceMetricsDatastore
-
updateNumberOfLastMinuteRequests
public void updateNumberOfLastMinuteRequests(String executorName, String teamId, String methodName)- Specified by:
updateNumberOfLastMinuteRequestsin interfaceMetricsDatastore
-
getNumberOfLastMinuteRequests
public Integer getNumberOfLastMinuteRequests(String executorName, String teamId, String methodName)- Specified by:
getNumberOfLastMinuteRequestsin interfaceMetricsDatastore
-
setNumberOfLastMinuteRequests
public void setNumberOfLastMinuteRequests(String executorName, String teamId, String methodName, Integer value)- Specified by:
setNumberOfLastMinuteRequestsin interfaceMetricsDatastore
-
getRateLimitedMethodRetryEpochMillis
public Long getRateLimitedMethodRetryEpochMillis(String executorName, String teamId, String methodName)- Specified by:
getRateLimitedMethodRetryEpochMillisin interfaceMetricsDatastore
-
setRateLimitedMethodRetryEpochMillis
public void setRateLimitedMethodRetryEpochMillis(String executorName, String teamId, String methodName, Long epochTimeMillis)- Specified by:
setRateLimitedMethodRetryEpochMillisin interfaceMetricsDatastore
-
addToLastMinuteRequests
public void addToLastMinuteRequests(String executorName, String teamId, String methodName, Long currentMillis)- Specified by:
addToLastMinuteRequestsin interfaceMetricsDatastore
-
getLastMinuteRequests
public LastMinuteRequests getLastMinuteRequests(String executorName, String teamId, String methodName)- Specified by:
getLastMinuteRequestsin interfaceMetricsDatastore
-
addToWaitingMessageIds
public void addToWaitingMessageIds(String executorName, String teamId, String methodName, String messageId)- Specified by:
addToWaitingMessageIdsin interfaceMetricsDatastore
-
deleteFromWaitingMessageIds
public void deleteFromWaitingMessageIds(String executorName, String teamId, String methodName, String messageId)- Specified by:
deleteFromWaitingMessageIdsin interfaceMetricsDatastore
-