murblanc commented on a change in pull request #2101: URL: https://github.com/apache/lucene-solr/pull/2101#discussion_r535354318
########## File path: solr/core/src/java/org/apache/solr/cluster/placement/PlacementPluginFactory.java ########## @@ -17,15 +17,37 @@ package org.apache.solr.cluster.placement; +import org.apache.solr.api.ConfigurablePlugin; + /** - * Factory implemented by client code and configured in {@code solr.xml} allowing the creation of instances of + * Factory implemented by client code and configured in container plugins allowing the creation of instances of * {@link PlacementPlugin} to be used for replica placement computation. + * <p>Note: configurable factory implementations should also implement + * {@link org.apache.solr.api.ConfigurablePlugin} with the appropriate configuration + * bean type.</p> */ -public interface PlacementPluginFactory { +public interface PlacementPluginFactory<T extends PlacementPluginConfig> extends ConfigurablePlugin<T> { /** - * Returns an instance of the plugin that will be repeatedly (and concurrently) be called to compute placement. Multiple + * The key in the plugins registry under which this plugin and its configuration are defined. + */ + String PLUGIN_NAME = ".placement-plugin"; + + /** + * Returns an instance of the plugin that will be repeatedly (and concurrently) called to compute placement. Multiple * instances of a plugin can be used in parallel (for example if configuration has to change, but plugin instances with * the previous configuration are still being used). */ - PlacementPlugin createPluginInstance(PlacementPluginConfig config); + PlacementPlugin createPluginInstance(); Review comment: See previous comment in [AddReplicaCmd](https://github.com/apache/lucene-solr/pull/2101/files#diff-9190d76945a6b15eee98e2a3725de99d342c635b87cec2992cc2a443c247e3e7R144). A comment should be added here saying that when this returns null it means legacy assign strategy. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscr...@lucene.apache.org For additional commands, e-mail: issues-h...@lucene.apache.org