Check if given data sources are seen as changed.

@param dataSources Data sources.
@return <code>true</code> if at least one of the given data sources
is marked as changed.
@see #changed(DataSource)
@see #populateIfChanged(DataSet...)
489009
@SafeVarargs
  public static boolean changed(DataSource... dataSources) {
    if (dataSources == null || dataSources.length == 0) {
      throw new InvalidOperationException("No data sources specified");
    }
    for (DataSource ds : dataSources) {
      if (ds.getDirtyStatus()) {
        return true;
      }
    }
    return false;
  }
134774
public function isReplicaSet($datasource)
    {
        if (array_key_exists($datasource,$this->dataSources))
        {
            if(array_key_exists("replicaSet",$this->dataSources[$datasource]) && !empty($this->dataSources[$datasource]["replicaSet"])) {
                return true;
            }
        }

        return false;
    }
894815
public function hasChanges(): bool
    {
        foreach ($this->getTables() as $table) {
            if ($table->getComparator()->hasChanges()) {
                return true;
            }
        }

        return false;
    }
1005749
@SafeVarargs
  public static void populate(DataSet... dataSets) {
    ensureDistinctDataSources(dataSets, DataSet::getSource);
    foreach(dataSets, DBSetup::populate, CallInfo.create());
  }
382214
private <T extends DataSource> T applyDataSourceProperties(T dataSource) {
        for (Map.Entry<Object, Object> entry : properties.entrySet()) {
            String key = entry.getKey().toString();
            String value = entry.getValue().toString();

            String propertyKey = PropertyKey.DATA_SOURCE_PROPERTY.getKey();
            if (key.startsWith(propertyKey)) {
                String dataSourceProperty = key.substring(propertyKey.length());
                ReflectionUtils.invokeSetter(dataSource, dataSourceProperty, value);
            }
        }
        return dataSource;
    }
1202358
public void updateDisabledDataSourceNames(final String dataSourceName, final boolean isDisabled) {
        if (isDisabled) {
            disabledDataSourceNames.add(dataSourceName);
        } else {
            disabledDataSourceNames.remove(dataSourceName);
        }
    }
83741
def _update_datasource(self, source, data):
        
        if isinstance(source, ColumnDataSource):
            if self.handles['static_source']:
                source.trigger('data', source.data, data)
            else:
                source.data.update(data)
        else:
            source.graph_layout = data
429700
@Pure
	public boolean isTemporaryChange() {
		final Object src = getSource();
		if (src instanceof MapLayer) {
			return ((MapLayer) src).isTemporaryLayer();
		}
		return false;
	}
762417
private void checkFileDataSource(FileDataSourceBase<?> fileSource) {
		String path = fileSource.getFilePath();
		if (path == null) {
			throw new InvalidProgramException("File path of FileDataSource is null.");
		}
		if (path.length() == 0) {
			throw new InvalidProgramException("File path of FileDataSource is empty string.");
		}
		
		try {
			Path p = new Path(path);
			String scheme = p.toUri().getScheme();
			
			if (scheme == null) {
				throw new InvalidProgramException("File path \"" + path + "\" of FileDataSource has no file system scheme (like 'file:// or hdfs://').");
			}
		} catch (Exception e) {
			throw new InvalidProgramException("File path \"" + path + "\" of FileDataSource is an invalid path: " + e.getMessage());
		}
	}
400611
@Subscribe
    public final synchronized void renew(final DataSourceChangedEvent dataSourceChangedEvent) throws Exception {
        if (!name.equals(dataSourceChangedEvent.getShardingSchemaName())) {
            return;
        }
        backendDataSource.close();
        dataSources.clear();
        dataSources.putAll(DataSourceConverter.getDataSourceParameterMap(dataSourceChangedEvent.getDataSourceConfigurations()));
        backendDataSource = new JDBCBackendDataSource(dataSources);
    }
274891
private Set<Source> calculateAddedSources() {
        Set<Source> added = new HashSet<>();
        for (String src : now.sources().keySet()) {
            if (prev.sources().get(src) == null) {
                added.add(now.sources().get(src));
            }
        }
        return added;
    }
397731
@Subscribe
    @SneakyThrows
    public final synchronized void renew(final DataSourceChangedEvent dataSourceChangedEvent) {
        dataSource.close();
        dataSource = new MasterSlaveDataSource(
                DataSourceConverter.getDataSourceMap(dataSourceChangedEvent.getDataSourceConfigurations()), dataSource.getMasterSlaveRule(), dataSource.getShardingProperties().getProps());
    }
1314518
public static DataSource createDataSource(String source, String type, String... configs){
		String config = StringUtils.join(configs, " ");
		return createDataSource(source, type, config);
	}
32607
public final void setDataSource(DataSource dataSource) {
		if (this.jdbcTemplate == null || dataSource != this.jdbcTemplate.getDataSource()) {
			this.jdbcTemplate = createJdbcTemplate(dataSource);
			initTemplateConfig();
		}
	}
496684
void addDataSource(DataSource dataSource) {
		if (dataSource == null) return;
		this.dataSources.add(new DataSourceDefinition(dataSource.name(), dataSource.driverClass(), dataSource.url(), dataSource.username(), dataSource.password()));
	}
717280
protected <T> boolean checkIfModified(CachedResource<T> cachedResource) {
        final Resource resource = cachedResource.getResource();

        // Check if the resource has been modified since it was last loaded.
        final long lastLoadTime = cachedResource.getLastLoadTime();
        final long mainLastModified = this.getLastModified(resource);
        boolean resourceModified = lastLoadTime < mainLastModified;
        if (resourceModified) {
            this.logger.trace(
                    "Resource {} was modified at {}, reloading",
                    new Object[] {resource, mainLastModified});
            return true;
        }

        // If the main resource hasn't changed check additional resources for modifications
        for (final Map.Entry<Resource, Long> additionalResourceEntry :
                cachedResource.getAdditionalResources().entrySet()) {
            final Resource additionalResource = additionalResourceEntry.getKey();
            final Long resourceLastLoadTime = additionalResourceEntry.getValue();

            final long lastModified = this.getLastModified(additionalResource);
            if (resourceLastLoadTime < lastModified) {
                this.logger.trace(
                        "Additional resource {} for {} was modified at {}, reloading",
                        new Object[] {additionalResource, resource, lastModified});
                return true;
            }
        }

        this.logger.trace(
                "{} has not been modified since last loaded {}, returning",
                cachedResource,
                lastLoadTime);
        return false;
    }
417300
public boolean isDataSourceModeSupported() {
	String id = getHandlerID(session.transferMode, session.transferType, SOURCE);
	return (dataHandlers.get(id) != null);
    }