Class RequestStats

java.lang.Object
com.slack.api.rate_limits.metrics.RequestStats

public class RequestStats extends Object
  • Constructor Details

    • RequestStats

      public RequestStats()
    • RequestStats

      public RequestStats(Long lastRequestTimestampMillis, Map<String,Long> allCompletedCalls, Map<String,Long> successfulCalls, Map<String,Long> unsuccessfulCalls, Map<String,Long> failedCalls, Map<String,Integer> currentQueueSize, Map<String,Integer> lastMinuteRequests, Map<String,Long> rateLimitedMethods)
      Creates a new RequestStats instance.
      Parameters:
      lastRequestTimestampMillis - The last request timestamp in milliseconds
      allCompletedCalls - Method name -> # of calls
      successfulCalls - Method name -> # of calls
      unsuccessfulCalls - Method name -> # of calls
      failedCalls - Method name -> # of calls
      currentQueueSize - Method name -> The queue size
      lastMinuteRequests - Method name -> The number of the requests in the last minute
      rateLimitedMethods - Method name -> Epoch millis to retry
  • Method Details

    • builder

      public static RequestStats.RequestStatsBuilder builder()
    • getLastRequestTimestampMillis

      public Long getLastRequestTimestampMillis()
      The last request timestamp in milliseconds
    • getAllCompletedCalls

      public Map<String,Long> getAllCompletedCalls()
      Method name -> # of calls
    • getSuccessfulCalls

      public Map<String,Long> getSuccessfulCalls()
      Method name -> # of calls
    • getUnsuccessfulCalls

      public Map<String,Long> getUnsuccessfulCalls()
      Method name -> # of calls
    • getFailedCalls

      public Map<String,Long> getFailedCalls()
      Method name -> # of calls
    • getCurrentQueueSize

      public Map<String,Integer> getCurrentQueueSize()
      Method name -> The queue size
    • getLastMinuteRequests

      public Map<String,Integer> getLastMinuteRequests()
      Method name -> The number of the requests in the last minute
    • getRateLimitedMethods

      public Map<String,Long> getRateLimitedMethods()
      Method name -> Epoch millis to retry
    • setLastRequestTimestampMillis

      public void setLastRequestTimestampMillis(Long lastRequestTimestampMillis)
      The last request timestamp in milliseconds
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • canEqual

      protected boolean canEqual(Object other)
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object