Class BasePrimaryAllocationCommand
java.lang.Object
org.elasticsearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand
org.elasticsearch.cluster.routing.allocation.command.BasePrimaryAllocationCommand
- All Implemented Interfaces:
AllocationCommand,NamedWriteable,Writeable,org.elasticsearch.common.xcontent.ToXContent,org.elasticsearch.common.xcontent.ToXContentObject
- Direct Known Subclasses:
AllocateEmptyPrimaryAllocationCommand,AllocateStalePrimaryAllocationCommand
public abstract class BasePrimaryAllocationCommand extends AbstractAllocateAllocationCommand
Abstract base class for allocating an unassigned primary shard to a node
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classBasePrimaryAllocationCommand.Builder<T extends BasePrimaryAllocationCommand>Nested classes/interfaces inherited from interface org.elasticsearch.common.xcontent.ToXContent
org.elasticsearch.common.xcontent.ToXContent.DelegatingMapParams, org.elasticsearch.common.xcontent.ToXContent.MapParams, org.elasticsearch.common.xcontent.ToXContent.ParamsNested classes/interfaces inherited from interface org.elasticsearch.common.io.stream.Writeable
Writeable.Reader<V>, Writeable.Writer<V> -
Field Summary
Fields Modifier and Type Field Description protected booleanacceptDataLossFields inherited from class org.elasticsearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand
index, node, shardId -
Constructor Summary
Constructors Modifier Constructor Description protectedBasePrimaryAllocationCommand(java.lang.String index, int shardId, java.lang.String node, boolean acceptDataLoss)protectedBasePrimaryAllocationCommand(StreamInput in)Read from a stream. -
Method Summary
Modifier and Type Method Description booleanacceptDataLoss()The operation only executes if the user explicitly agrees to possible data lossprotected static <T extends BasePrimaryAllocationCommand.Builder<?>>
org.elasticsearch.common.xcontent.ObjectParser<T,java.lang.Void>createAllocatePrimaryParser(java.lang.String command)booleanequals(java.lang.Object obj)protected voidextraXContent(org.elasticsearch.common.xcontent.XContentBuilder builder)inthashCode()voidwriteTo(StreamOutput out)Write this into the StreamOutput.Methods inherited from class org.elasticsearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand
createAllocateParser, explainOrThrowMissingRoutingNode, explainOrThrowRejectedCommand, explainOrThrowRejectedCommand, index, initializeUnassignedShard, initializeUnassignedShard, node, shardId, toXContentMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.elasticsearch.cluster.routing.allocation.command.AllocationCommand
execute, getMessage, getWriteableName, name
-
Field Details
-
acceptDataLoss
protected final boolean acceptDataLoss
-
-
Constructor Details
-
BasePrimaryAllocationCommand
protected BasePrimaryAllocationCommand(java.lang.String index, int shardId, java.lang.String node, boolean acceptDataLoss) -
BasePrimaryAllocationCommand
Read from a stream.- Throws:
java.io.IOException
-
-
Method Details
-
createAllocatePrimaryParser
protected static <T extends BasePrimaryAllocationCommand.Builder<?>> org.elasticsearch.common.xcontent.ObjectParser<T,java.lang.Void> createAllocatePrimaryParser(java.lang.String command) -
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classAbstractAllocateAllocationCommand- Throws:
java.io.IOException
-
acceptDataLoss
public boolean acceptDataLoss()The operation only executes if the user explicitly agrees to possible data loss- Returns:
- whether data loss is acceptable
-
extraXContent
protected void extraXContent(org.elasticsearch.common.xcontent.XContentBuilder builder) throws java.io.IOException- Overrides:
extraXContentin classAbstractAllocateAllocationCommand- Throws:
java.io.IOException
-
equals
public boolean equals(java.lang.Object obj)- Overrides:
equalsin classAbstractAllocateAllocationCommand
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractAllocateAllocationCommand
-