public void addRateLimit(RateLimitType type,Server server,long retryAfter){
  if (server == null) {
    rateLimits.put(type,System.currentTimeMillis() + retryAfter);
  }
 else {
    HashMap<RateLimitType,Long> rateLimits=serverRateLimits.get(server);
    if (rateLimits == null) {
      rateLimits=new HashMap<>();
      serverRateLimits.put(server,rateLimits);
    }
    rateLimits.put(type,System.currentTimeMillis() + retryAfter);
  }
}

public void addRateLimit ( RateLimitType type , Server server , long retryAfter ) { if ( server == null ) { rateLimits . put ( type , System . currentTimeMillis ( ) + retryAfter ) ; } else { HashMap < RateLimitType , Long > rateLimits = serverRateLimits . get ( server ) ; if ( rateLimits == null ) { rateLimits = new HashMap < > ( ) ; serverRateLimits . put ( server , rateLimits ) ; } rateLimits . put ( type , System . currentTimeMillis ( ) + retryAfter ) ; } }
adds a rate limit for the given type .
