Class ReplicaAfterPrimaryActiveAllocationDecider
java.lang.Object
org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
org.elasticsearch.cluster.routing.allocation.decider.ReplicaAfterPrimaryActiveAllocationDecider
An allocation strategy that only allows for a replica to be allocated when the primary is active.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptioncanAllocate(ShardRouting shardRouting, RoutingAllocation allocation)
Returns aDecision
whether the given shard routing can be allocated at all at this state of theRoutingAllocation
.canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)
Returns aDecision
whether the given shard routing can be allocated on the given node.Methods inherited from class org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
canAllocate, canForceAllocatePrimary, canRebalance, canRebalance, canRemain, shouldAutoExpandToNode
-
Constructor Details
-
ReplicaAfterPrimaryActiveAllocationDecider
public ReplicaAfterPrimaryActiveAllocationDecider()
-
-
Method Details
-
canAllocate
public Decision canAllocate(ShardRouting shardRouting, RoutingNode node, RoutingAllocation allocation)Description copied from class:AllocationDecider
Returns aDecision
whether the given shard routing can be allocated on the given node. The default isDecision.ALWAYS
.- Overrides:
canAllocate
in classAllocationDecider
-
canAllocate
Description copied from class:AllocationDecider
Returns aDecision
whether the given shard routing can be allocated at all at this state of theRoutingAllocation
. The default isDecision.ALWAYS
.- Overrides:
canAllocate
in classAllocationDecider
-