Class ReplicaAfterPrimaryActiveAllocationDecider
- java.lang.Object
-
- org.elasticsearch.common.component.AbstractComponent
-
- org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
-
- org.elasticsearch.cluster.routing.allocation.decider.ReplicaAfterPrimaryActiveAllocationDecider
-
public class ReplicaAfterPrimaryActiveAllocationDecider extends AllocationDecider
An allocation strategy that only allows for a replica to be allocated when the primary is active.
-
-
Field Summary
-
Fields inherited from class org.elasticsearch.common.component.AbstractComponent
deprecationLogger, logger, settings
-
-
Constructor Summary
Constructors Constructor Description ReplicaAfterPrimaryActiveAllocationDecider(Settings settings)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Decision
canAllocate(ShardRouting shardRouting, RoutingAllocation allocation)
Returns aDecision
whether the given shard routing can be allocated at all at this state of theRoutingAllocation
.Decision
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.common.component.AbstractComponent
logDeprecatedSetting, logRemovedSetting, nodeName
-
Methods inherited from class org.elasticsearch.cluster.routing.allocation.decider.AllocationDecider
canAllocate, canAllocate, canForceAllocatePrimary, canRebalance, canRebalance, canRemain
-
-
-
-
Constructor Detail
-
ReplicaAfterPrimaryActiveAllocationDecider
public ReplicaAfterPrimaryActiveAllocationDecider(Settings settings)
-
-
Method Detail
-
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
public Decision canAllocate(ShardRouting shardRouting, RoutingAllocation allocation)
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
-
-