public synchronized void init(){
  if (_statsOn) {
    return;
  }
  _statsOn=true;
  executor=Executors.newSingleThreadScheduledExecutor(new CustomizableThreadFactory(STAT_THREAD_NAME));
  executor.scheduleAtFixedRate(new StatLogger(),_displayRateInMins,_displayRateInMins,TimeUnit.MINUTES);
  executor.scheduleAtFixedRate(new PerMinuteProcessing(),61,60,TimeUnit.SECONDS);
  executor.scheduleAtFixedRate(new PerHourProcessing(),3601,3600,TimeUnit.SECONDS);
  executor.scheduleAtFixedRate(new PerDayProcessing(),86401,86400,TimeUnit.SECONDS);
}

public synchronized void init ( ) { if ( _statsOn ) { return ; } _statsOn = true ; executor = Executors . newSingleThreadScheduledExecutor ( new CustomizableThreadFactory ( STAT_THREAD_NAME ) ) ; executor . scheduleAtFixedRate ( new StatLogger ( ) , _displayRateInMins , _displayRateInMins , TimeUnit . MINUTES ) ; executor . scheduleAtFixedRate ( new PerMinuteProcessing ( ) , 61 , 60 , TimeUnit . SECONDS ) ; executor . scheduleAtFixedRate ( new PerHourProcessing ( ) , 3601 , 3600 , TimeUnit . SECONDS ) ; executor . scheduleAtFixedRate ( new PerDayProcessing ( ) , 86401 , 86400 , TimeUnit . SECONDS ) ; }
turns the stat engine on
