org.elasticsearch.cluster.routing.strategy
Class DefaultShardsRoutingStrategy

java.lang.Object
  extended by org.elasticsearch.cluster.routing.strategy.DefaultShardsRoutingStrategy
All Implemented Interfaces:
ShardsRoutingStrategy

public class DefaultShardsRoutingStrategy
extends java.lang.Object
implements ShardsRoutingStrategy


Constructor Summary
DefaultShardsRoutingStrategy()
           
 
Method Summary
 RoutingTable applyFailedShards(ClusterState clusterState, java.lang.Iterable<? extends ShardRouting> failedShardEntries)
          Applies the failed shards.
 RoutingTable applyStartedShards(ClusterState clusterState, java.lang.Iterable<? extends ShardRouting> startedShardEntries)
          Applies the started shards.
 RoutingTable reroute(ClusterState clusterState)
          Reroutes the routing table based on the live nodes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultShardsRoutingStrategy

public DefaultShardsRoutingStrategy()
Method Detail

applyStartedShards

public RoutingTable applyStartedShards(ClusterState clusterState,
                                       java.lang.Iterable<? extends ShardRouting> startedShardEntries)
Description copied from interface: ShardsRoutingStrategy
Applies the started shards. Note, shards can be called several times within this method.

If the same instance of the routing table is returned, then no change has been made.

Specified by:
applyStartedShards in interface ShardsRoutingStrategy

applyFailedShards

public RoutingTable applyFailedShards(ClusterState clusterState,
                                      java.lang.Iterable<? extends ShardRouting> failedShardEntries)
Description copied from interface: ShardsRoutingStrategy
Applies the failed shards. Note, shards can be called several times within this method.

If the same instance of the routing table is returned, then no change has been made.

Specified by:
applyFailedShards in interface ShardsRoutingStrategy

reroute

public RoutingTable reroute(ClusterState clusterState)
Description copied from interface: ShardsRoutingStrategy
Reroutes the routing table based on the live nodes.

If the same instance of the routing table is returned, then no change has been made.

Specified by:
reroute in interface ShardsRoutingStrategy