use of org.apache.ignite.plugin.CacheTopologyValidatorProvider in project ignite by apache.
the class CacheGroupContext method topologyValidators.
/**
* @param ccfg Cache configuration.
* @param plugins Ignite plugin processor.
* @return Comprehensive collection of topology validators for the cache based on its configuration
* and plugin extensions.
*/
private Collection<TopologyValidator> topologyValidators(CacheConfiguration<?, ?> ccfg, IgnitePluginProcessor plugins) {
List<TopologyValidator> res = new ArrayList<>();
TopologyValidator ccfgTopValidator = ccfg.getTopologyValidator();
if (ccfgTopValidator != null)
res.add(ccfgTopValidator);
CacheTopologyValidatorProvider[] topValidatorProviders = plugins.extensions(CacheTopologyValidatorProvider.class);
if (F.isEmpty(topValidatorProviders))
return res;
for (CacheTopologyValidatorProvider topValidatorProvider : topValidatorProviders) {
TopologyValidator validator = topValidatorProvider.topologyValidator(cacheOrGroupName());
if (validator != null)
res.add(validator);
}
return res;
}
Aggregations