use of org.ovirt.engine.core.vdsbroker.monitoring.HostMonitoring in project ovirt-engine by oVirt.
the class VdsManager method refreshImpl.
public void refreshImpl() {
boolean releaseLock = true;
if (lockManager.acquireLock(monitoringLock).getFirst()) {
try {
setIsSetNonOperationalExecuted(false);
synchronized (this) {
refreshCachedVds();
if (cachedVds == null) {
log.error("VdsManager::refreshVdsRunTimeInfo - onTimer is NULL for '{}'", getVdsId());
return;
}
try {
updateIteration();
if (isMonitoringNeeded()) {
setStartTime();
releaseLock = false;
hostMonitoring = new HostMonitoring(this, cachedVds, monitoringStrategy, resourceManager, dbFacade, auditLogDirector);
hostMonitoring.refresh();
}
} catch (VDSNetworkException e) {
logNetworkException(e);
releaseLock = true;
} catch (VDSRecoveringException ex) {
handleVdsRecoveringException(ex);
releaseLock = true;
} catch (RuntimeException ex) {
logFailureMessage(ex);
releaseLock = true;
}
}
} catch (Throwable t) {
releaseLock = true;
throw t;
} finally {
if (releaseLock) {
lockManager.releaseLock(monitoringLock);
}
}
}
}
Aggregations