make the shard routing an actual component

This commit is contained in:
kimchy 2010-06-30 23:39:27 +03:00
parent 811559f393
commit b0d736b489
1 changed files with 13 additions and 1 deletions

View File

@ -22,6 +22,10 @@ package org.elasticsearch.cluster.routing.strategy;
import org.elasticsearch.cluster.ClusterState;
import org.elasticsearch.cluster.node.DiscoveryNode;
import org.elasticsearch.cluster.routing.*;
import org.elasticsearch.common.component.AbstractComponent;
import org.elasticsearch.common.inject.Inject;
import org.elasticsearch.common.settings.ImmutableSettings;
import org.elasticsearch.common.settings.Settings;
import java.util.Iterator;
import java.util.List;
@ -33,7 +37,15 @@ import static org.elasticsearch.common.collect.Sets.*;
/**
* @author kimchy (shay.banon)
*/
public class ShardsRoutingStrategy {
public class ShardsRoutingStrategy extends AbstractComponent {
public ShardsRoutingStrategy() {
super(ImmutableSettings.Builder.EMPTY_SETTINGS);
}
@Inject public ShardsRoutingStrategy(Settings settings) {
super(settings);
}
/**
* Applies the started shards. Note, shards can be called several times within this method.