protected void updateThrottle(){
  long now=CurrentTime.getCurrentTimeActual();
  if (_throttleTimestamp + _throttlePeriod < now) {
    _throttleTimestamp=now;
    _throttleCount=1;
    _isThrottle=false;
    return;
  }
  _throttleCount++;
  if (_throttleCount < _throttleLimit) {
    return;
  }
  if (!_isThrottle) {
    _isThrottle=true;
    if (_throttleSleep > 0 || log.isLoggable(Level.FINE)) {
      String msg=(this + " " + _throttleCount+ " threads created in "+ _throttlePeriod+ "ms"+ " sleep="+ _throttleSleep+ "ms");
      onThrottle(msg);
    }
  }
  if (_throttleSleep > 0) {
    try {
      Thread.sleep(_throttleSleep);
    }
 catch (    Exception e) {
    }
  }
}

protected void updateThrottle ( ) { long now = CurrentTime . getCurrentTimeActual ( ) ; if ( _throttleTimestamp + _throttlePeriod < now ) { _throttleTimestamp = now ; _throttleCount = 1 ; _isThrottle = false ; return ; } _throttleCount ++ ; if ( _throttleCount < _throttleLimit ) { return ; } if ( ! _isThrottle ) { _isThrottle = true ; if ( _throttleSleep > 0 || log . isLoggable ( Level . FINE ) ) { String msg = ( this + " " + _throttleCount + " threads created in " + _throttlePeriod + "ms" + " sleep=" + _throttleSleep + "ms" ) ; onThrottle ( msg ) ; } } if ( _throttleSleep > 0 ) { try { Thread . sleep ( _throttleSleep ) ; } catch ( Exception e ) { } } }
throttle the thread creation , so only 100 threads / sec ( default ) can be created .
