bug 10290: Allow turning off router stats collector

Status 10290: resolved fixed
This commit is contained in:
Nitin 2011-07-21 19:52:32 +05:30
parent 1e0c7274ec
commit 0c91e938e1
1 changed files with 5 additions and 1 deletions

View File

@ -587,7 +587,11 @@ public class VirtualNetworkApplianceManagerImpl implements VirtualNetworkApplian
@Override
public boolean start() {
_executor.scheduleAtFixedRate(new NetworkUsageTask(), _routerStatsInterval, _routerStatsInterval, TimeUnit.SECONDS);
if (_routerStatsInterval > 0){
_executor.scheduleAtFixedRate(new NetworkUsageTask(), _routerStatsInterval, _routerStatsInterval, TimeUnit.SECONDS);
}else{
s_logger.debug("router.stats.interval - " + _routerStatsInterval+ " so not scheduling the router stats thread");
}
return true;
}