better method name, to correspond to addLast

This commit is contained in:
Shay Banon 2012-02-15 10:12:08 +02:00
parent d31fdccc97
commit fe11368c89
3 changed files with 3 additions and 5 deletions

View File

@ -29,8 +29,6 @@ import org.elasticsearch.common.unit.TimeValue;
/** /**
* The cluster service allowing to both register for cluster state events ({@link ClusterStateListener}) * The cluster service allowing to both register for cluster state events ({@link ClusterStateListener})
* and submit state update tasks ({@link ClusterStateUpdateTask}. * and submit state update tasks ({@link ClusterStateUpdateTask}.
*
*
*/ */
public interface ClusterService extends LifecycleComponent<ClusterService> { public interface ClusterService extends LifecycleComponent<ClusterService> {
@ -57,7 +55,7 @@ public interface ClusterService extends LifecycleComponent<ClusterService> {
/** /**
* Adds a priority listener for updated cluster states. * Adds a priority listener for updated cluster states.
*/ */
void addPriority(ClusterStateListener listener); void addFirst(ClusterStateListener listener);
/** /**
* Adds last listener. * Adds last listener.

View File

@ -61,7 +61,7 @@ public class RoutingService extends AbstractLifecycleComponent<RoutingService> i
this.clusterService = clusterService; this.clusterService = clusterService;
this.allocationService = allocationService; this.allocationService = allocationService;
this.schedule = componentSettings.getAsTime("schedule", timeValueSeconds(10)); this.schedule = componentSettings.getAsTime("schedule", timeValueSeconds(10));
clusterService.addPriority(this); clusterService.addFirst(this);
} }
@Override @Override

View File

@ -150,7 +150,7 @@ public class InternalClusterService extends AbstractLifecycleComponent<ClusterSe
return this.clusterState; return this.clusterState;
} }
public void addPriority(ClusterStateListener listener) { public void addFirst(ClusterStateListener listener) {
priorityClusterStateListeners.add(listener); priorityClusterStateListeners.add(listener);
} }