private boolean incrementAndCheckCount(AtomicInteger initialCount,int requestLimit){
  int count=initialCount.incrementAndGet();
  if (count > requestLimit && requestLimit != DISABLED_RATE) {
    initialCount.decrementAndGet();
    LOG.info("reject: {} > {}",count,requestLimit);
    return false;
  }
  return true;
}

private boolean incrementAndCheckCount ( AtomicInteger initialCount , int requestLimit ) { int count = initialCount . incrementAndGet ( ) ; if ( count > requestLimit && requestLimit != DISABLED_RATE ) { initialCount . decrementAndGet ( ) ; LOG . info ( "reject: {} > {}" , count , requestLimit ) ; return false ; } return true ; }
increment the initial count and check if the count has gone over the request limit .
