org.elasticsearch.cluster.routing.allocation
Class ReplicaAfterPrimaryActiveNodeAllocation

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.ReplicaAfterPrimaryActiveNodeAllocation

public class ReplicaAfterPrimaryActiveNodeAllocation
extends NodeAllocation

An allocation strategy that only allows for a replica to be allocated when the primary is active.


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
ReplicaAfterPrimaryActiveNodeAllocation(Settings settings)
           
 
Method Summary
 NodeAllocation.Decision canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
           
 
Methods inherited from class org.elasticsearch.cluster.routing.allocation.NodeAllocation
allocateUnassigned, applyFailedShards, applyStartedShards, canRebalance
 
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

ReplicaAfterPrimaryActiveNodeAllocation

@Inject
public ReplicaAfterPrimaryActiveNodeAllocation(Settings settings)
Method Detail

canAllocate

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