}
return s_instance;
}
private StatsCollector(Map<String, String> configs) {
ComponentLocator locator = ComponentLocator.getLocator(ManagementServer.Name);
_agentMgr = locator.getManager(AgentManager.class);
_userVmMgr = locator.getManager(UserVmManager.class);
_ssvmMgr = locator.getManager(SecondaryStorageVmManager.class);
_hostDao = locator.getDao(HostDao.class);
_userVmDao = locator.getDao(UserVmDao.class);
_volsDao = locator.getDao(VolumeDao.class);
_storagePoolDao = locator.getDao(StoragePoolDao.class);
_storageManager = locator.getManager(StorageManager.class);
_storagePoolHostDao = locator.getDao(StoragePoolHostDao.class);
_resourceMgr = locator.getManager(ResourceManager.class);
_executor = Executors.newScheduledThreadPool(3, new NamedThreadFactory("StatsCollector"));
hostStatsInterval = NumbersUtil.parseLong(configs.get("host.stats.interval"), 60000L);
hostAndVmStatsInterval = NumbersUtil.parseLong(configs.get("vm.stats.interval"), 60000L);