diff --git a/src/main/java/org/elasticsearch/cluster/ClusterService.java b/src/main/java/org/elasticsearch/cluster/ClusterService.java index da47f108662..3a3813041d5 100644 --- a/src/main/java/org/elasticsearch/cluster/ClusterService.java +++ b/src/main/java/org/elasticsearch/cluster/ClusterService.java @@ -29,8 +29,6 @@ import org.elasticsearch.common.unit.TimeValue; /** * The cluster service allowing to both register for cluster state events ({@link ClusterStateListener}) * and submit state update tasks ({@link ClusterStateUpdateTask}. - * - * */ public interface ClusterService extends LifecycleComponent { @@ -57,7 +55,7 @@ public interface ClusterService extends LifecycleComponent { /** * Adds a priority listener for updated cluster states. */ - void addPriority(ClusterStateListener listener); + void addFirst(ClusterStateListener listener); /** * Adds last listener. diff --git a/src/main/java/org/elasticsearch/cluster/routing/RoutingService.java b/src/main/java/org/elasticsearch/cluster/routing/RoutingService.java index 639444bd34f..2b131ffdabc 100644 --- a/src/main/java/org/elasticsearch/cluster/routing/RoutingService.java +++ b/src/main/java/org/elasticsearch/cluster/routing/RoutingService.java @@ -61,7 +61,7 @@ public class RoutingService extends AbstractLifecycleComponent i this.clusterService = clusterService; this.allocationService = allocationService; this.schedule = componentSettings.getAsTime("schedule", timeValueSeconds(10)); - clusterService.addPriority(this); + clusterService.addFirst(this); } @Override diff --git a/src/main/java/org/elasticsearch/cluster/service/InternalClusterService.java b/src/main/java/org/elasticsearch/cluster/service/InternalClusterService.java index a59cf29a220..688510c1f0a 100644 --- a/src/main/java/org/elasticsearch/cluster/service/InternalClusterService.java +++ b/src/main/java/org/elasticsearch/cluster/service/InternalClusterService.java @@ -150,7 +150,7 @@ public class InternalClusterService extends AbstractLifecycleComponent