Source:
public void _updatingTimer_Elapsed() { try { syncLock.lock(); if (!_disposed) { StoragePool storagePool = DbFacade.getInstance().getStoragePoolDao() .get(_storagePoolId); if (storagePool != null) { boolean poolStatusDeterminedByHostsStatus = FeatureSupported.dataCenterWithoutSpm(storagePool.getCompatibilityVersion()); if (DbFacade.getInstance() .getVdsDao() .getAllForStoragePoolAndStatus(_storagePoolId, IrsBrokerCommand.reportingVdsStatus) .isEmpty()) { StoragePoolDomainHelper.updateApplicablePoolDomainsStatuses(_storagePoolId, StoragePoolDomainHelper.storageDomainMonitoredStatus, StorageDomainStatus.Unknown, "no reporting hosts"); if (poolStatusDeterminedByHostsStatus && storagePool.getStatus() != StoragePoolStatus.NonResponsive) { updateStoragePoolStatus(storagePool.getId(), StoragePoolStatus.NonResponsive, AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_NON_RESPONSIVE_NO_REPORTING_HOSTS, EngineError.ENGINE); } } else if (poolStatusDeterminedByHostsStatus && storagePool.getStatus() != StoragePoolStatus.Up) { updateStoragePoolStatus(storagePool.getId(), StoragePoolStatus.Up, AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_UP_REPORTING_HOSTS, null); } if (storagePool.getStatus() == StoragePoolStatus.Up || storagePool.getStatus() == StoragePoolStatus.NonResponsive || storagePool.getStatus() == StoragePoolStatus.Contend) { if (!poolStatusDeterminedByHostsStatus) { proceedStoragePoolStats(storagePool); } else { List<StorageDomain> storageDomains = DbFacade.getInstance().getStorageDomainDao() .getAllForStoragePool(storagePool.getId()); domainsInMaintenanceCheck(storageDomains); } } } } } catch (Exception ex) { } finally { syncLock.unlock(); } }

Target:
public void _updatingTimer_Elapsed() { try (AutoCloseableLock l = new AutoCloseableLock(getLock())) { if (!_disposed) { StoragePool storagePool = DbFacade.getInstance().getStoragePoolDao() .get(_storagePoolId); if (storagePool != null) { boolean poolStatusDeterminedByHostsStatus = FeatureSupported.dataCenterWithoutSpm(storagePool.getCompatibilityVersion()); if (DbFacade.getInstance() .getVdsDao() .getAllForStoragePoolAndStatus(_storagePoolId, IrsBrokerCommand.reportingVdsStatus) .isEmpty()) { StoragePoolDomainHelper.updateApplicablePoolDomainsStatuses(_storagePoolId, StoragePoolDomainHelper.storageDomainMonitoredStatus, StorageDomainStatus.Unknown, "no reporting hosts"); if (poolStatusDeterminedByHostsStatus && storagePool.getStatus() != StoragePoolStatus.NonResponsive) { updateStoragePoolStatus(storagePool.getId(), StoragePoolStatus.NonResponsive, AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_NON_RESPONSIVE_NO_REPORTING_HOSTS, EngineError.ENGINE); } } else if (poolStatusDeterminedByHostsStatus && storagePool.getStatus() != StoragePoolStatus.Up) { updateStoragePoolStatus(storagePool.getId(), StoragePoolStatus.Up, AuditLogType.SYSTEM_CHANGE_STORAGE_POOL_STATUS_UP_REPORTING_HOSTS, null); } if (storagePool.getStatus() == StoragePoolStatus.Up || storagePool.getStatus() == StoragePoolStatus.NonResponsive || storagePool.getStatus() == StoragePoolStatus.Contend) { if (!poolStatusDeterminedByHostsStatus) { proceedStoragePoolStats(storagePool); } else { List<StorageDomain> storageDomains = DbFacade.getInstance().getStorageDomainDao() .getAllForStoragePool(storagePool.getId()); domainsInMaintenanceCheck(storageDomains); } } } } } catch (Exception ex) { } }