use of com.cloud.info.RunningHostInfoAgregator in project cloudstack by apache.
the class SecondaryStorageManagerImpl method getZoneHostInfo.
private synchronized Map<Long, ZoneHostInfo> getZoneHostInfo() {
Date cutTime = DateUtil.currentGMTTime();
List<RunningHostCountInfo> runningHostCountInfos = _hostDao.getRunningHostCounts(new Date(cutTime.getTime() - ClusterManager.HeartbeatThreshold.value()));
RunningHostInfoAgregator aggregator = new RunningHostInfoAgregator();
if (CollectionUtils.isNotEmpty(runningHostCountInfos)) {
for (RunningHostCountInfo countInfo : runningHostCountInfos) {
aggregator.aggregate(countInfo);
}
}
return aggregator.getZoneHostInfoMap();
}
use of com.cloud.info.RunningHostInfoAgregator in project cloudstack by apache.
the class ConsoleProxyManagerImpl method getZoneHostInfo.
private synchronized Map<Long, ZoneHostInfo> getZoneHostInfo() {
Date cutTime = DateUtil.currentGMTTime();
List<RunningHostCountInfo> l = hostDao.getRunningHostCounts(new Date(cutTime.getTime() - ClusterManager.HeartbeatThreshold.value()));
RunningHostInfoAgregator aggregator = new RunningHostInfoAgregator();
if (l.size() > 0) {
for (RunningHostCountInfo countInfo : l) {
aggregator.aggregate(countInfo);
}
}
return aggregator.getZoneHostInfoMap();
}
use of com.cloud.info.RunningHostInfoAgregator in project cosmic by MissionCriticalCloud.
the class SystemVmManagerBase method getLongZoneHostInfoMap.
protected static Map<Long, ZoneHostInfo> getLongZoneHostInfoMap(final HostDao _hostDao) {
final Date cutTime = DateUtil.currentGMTTime();
final List<RunningHostCountInfo> l = _hostDao.getRunningHostCounts(new Date(cutTime.getTime() - ClusterManager.HeartbeatThreshold.value()));
final RunningHostInfoAgregator aggregator = new RunningHostInfoAgregator();
if (l.size() > 0) {
for (final RunningHostCountInfo countInfo : l) {
aggregator.aggregate(countInfo);
}
}
return aggregator.getZoneHostInfoMap();
}
Aggregations