Class ShardAllocationDecision

java.lang.Object
org.elasticsearch.cluster.routing.allocation.ShardAllocationDecision
All Implemented Interfaces:
Writeable, ToXContent, ToXContentFragment

public final class ShardAllocationDecision extends Object implements ToXContentFragment, Writeable
Represents the decision taken for the allocation of a single shard. If the shard is unassigned, getAllocateDecision() will return an object containing the decision and its explanation, and getMoveDecision() will return an object for which MoveDecision.isDecisionTaken() returns false. If the shard is in the started state, then getMoveDecision() will return an object containing the decision to move/rebalance the shard, and getAllocateDecision() will return an object for which AllocateUnassignedDecision.isDecisionTaken() returns false. If the shard is neither unassigned nor started (i.e. it is initializing or relocating), then both getAllocateDecision() and getMoveDecision() will return objects whose isDecisionTaken() method returns false.