@@ -0,0 +1,14 @@
+package org.apache.solr.cluster.events;
+
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+
+/**
+ * Intended for {@link org.apache.solr.core.CoreContainer} plugins that should be
+ * enabled only one instance per cluster.
+ * <p>Implementation detail: currently these plugins are instantiated on the
+ * Overseer leader, and closed when the current node loses its leadership.</p>
+ */
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ClusterSingleton {
+}
I'm not sure Solr core code should be responsible for coordinating plugins' coordination like this. I feel we should keep this coordination left to the plugins. I am NOT saying that the autoscaling plugin should do this on its own, but I am just saying that "some plugin" should do it for the autoscaling plugin. IOW, this coordination code shouldn't be in solr-core. As an example, we can have two plugins: "autoscaling-framework-plugin" depends on "lifecycle-coordination-plugin". The latter can have these concepts defined in them, including the actual implementation.