org.elasticsearch.cluster.routing.allocation
Class NodeAllocations

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

public class NodeAllocations
extends NodeAllocation

Holds several NodeAllocations and combines them into a single allocation decision.


Nested Class Summary
 
Nested classes/interfaces inherited from class org.elasticsearch.cluster.routing.allocation.NodeAllocation
NodeAllocation.Decision
 
Field Summary
 
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
componentSettings, logger, settings
 
Constructor Summary
NodeAllocations(Settings settings)
           
NodeAllocations(Settings settings, java.util.Set<NodeAllocation> allocations)
           
 
Method Summary
 boolean allocateUnassigned(NodeAllocations nodeAllocations, RoutingAllocation allocation)
           
 void applyFailedShards(NodeAllocations nodeAllocations, FailedRerouteAllocation allocation)
           
 void applyStartedShards(NodeAllocations nodeAllocations, StartedRerouteAllocation allocation)
           
 NodeAllocation.Decision canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
           
 boolean canRebalance(ShardRouting shardRouting, RoutingAllocation allocation)
           
 
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

NodeAllocations

public NodeAllocations(Settings settings)

NodeAllocations

@Inject
public NodeAllocations(Settings settings,
                              java.util.Set<NodeAllocation> allocations)
Method Detail

applyStartedShards

public void applyStartedShards(NodeAllocations nodeAllocations,
                               StartedRerouteAllocation allocation)
Overrides:
applyStartedShards in class NodeAllocation

applyFailedShards

public void applyFailedShards(NodeAllocations nodeAllocations,
                              FailedRerouteAllocation allocation)
Overrides:
applyFailedShards in class NodeAllocation

canRebalance

public boolean canRebalance(ShardRouting shardRouting,
                            RoutingAllocation allocation)
Overrides:
canRebalance in class NodeAllocation

allocateUnassigned

public boolean allocateUnassigned(NodeAllocations nodeAllocations,
                                  RoutingAllocation allocation)
Overrides:
allocateUnassigned in class NodeAllocation

canAllocate

public NodeAllocation.Decision canAllocate(ShardRouting shardRouting,
                                           RoutingNode node,
                                           RoutingAllocation allocation)
Overrides:
canAllocate in class NodeAllocation