org.elasticsearch.cluster.routing.allocation
Class ShardsAllocation

java.lang.Object
  extended by org.elasticsearch.common.component.AbstractComponent
      extended by org.elasticsearch.cluster.routing.allocation.ShardsAllocation

public class ShardsAllocation
extends AbstractComponent


Field Summary
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
ShardsAllocation()
           
ShardsAllocation(Settings settings)
           
ShardsAllocation(Settings settings, NodeAllocations nodeAllocations)
           
 
Method Summary
 RoutingAllocation.Result applyFailedShards(ClusterState clusterState, java.util.List<? extends ShardRouting> failedShards)
          Applies the failed shards.
 RoutingAllocation.Result applyStartedShards(ClusterState clusterState, java.util.List<? extends ShardRouting> startedShards)
          Applies the started shards.
 RoutingAllocation.Result reroute(ClusterState clusterState)
          Reroutes the routing table based on the live nodes.
 
Methods inherited from class org.elasticsearch.common.component.AbstractComponent
nodeName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShardsAllocation

public ShardsAllocation()

ShardsAllocation

public ShardsAllocation(Settings settings)

ShardsAllocation

@Inject
public ShardsAllocation(Settings settings,
                               NodeAllocations nodeAllocations)
Method Detail

applyStartedShards

public RoutingAllocation.Result applyStartedShards(ClusterState clusterState,
                                                   java.util.List<? extends ShardRouting> startedShards)
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.


applyFailedShards

public RoutingAllocation.Result applyFailedShards(ClusterState clusterState,
                                                  java.util.List<? extends ShardRouting> failedShards)
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.


reroute

public RoutingAllocation.Result reroute(ClusterState clusterState)
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.