Class RateLimit

java.lang.Object
org.knowm.xchange.dto.meta.RateLimit
All Implemented Interfaces:
Serializable

public class RateLimit extends Object implements Serializable
Describe a call rate limit as a number of calls per some time span.
See Also:
  • Field Details

    • calls

      public int calls
    • timeSpan

      public int timeSpan
    • timeUnit

      public TimeUnit timeUnit
  • Constructor Details

    • RateLimit

      public RateLimit()
      Constructor
    • RateLimit

      public RateLimit(int calls, int timeSpan, TimeUnit timeUnit)
      Constructor
      Parameters:
      calls -
      timeSpan -
      timeUnit -
  • Method Details

    • getPollDelayMillis

      public long getPollDelayMillis()
      Returns:
      this rate limit as a number of milliseconds required between any two remote calls, assuming the client makes consecutive calls without any bursts or breaks for an infinite period of time.
    • toString

      public String toString()
      Overrides:
      toString in class Object