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
Abstract base class for allocating an unassigned primary shard to a node
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classNested 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
FieldsFields inherited from class org.elasticsearch.cluster.routing.allocation.command.AbstractAllocateAllocationCommand
index, node, shardIdFields inherited from interface org.elasticsearch.common.xcontent.ToXContent
EMPTY_PARAMS -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBasePrimaryAllocationCommand(String index, int shardId, String node, boolean acceptDataLoss)protectedRead from a stream. -
Method Summary
Modifier and TypeMethodDescriptionbooleanThe operation only executes if the user explicitly agrees to possible data lossprotected static <T extends BasePrimaryAllocationCommand.Builder<?>>
org.elasticsearch.common.xcontent.ObjectParser<T,Void>createAllocatePrimaryParser(String command)booleanprotected 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, nameMethods inherited from interface org.elasticsearch.common.xcontent.ToXContentObject
isFragment
-
Field Details
-
acceptDataLoss
protected final boolean acceptDataLoss
-
-
Constructor Details
-
BasePrimaryAllocationCommand
-
BasePrimaryAllocationCommand
Read from a stream.- Throws:
IOException
-
-
Method Details
-
createAllocatePrimaryParser
protected static <T extends BasePrimaryAllocationCommand.Builder<?>> org.elasticsearch.common.xcontent.ObjectParser<T,Void> createAllocatePrimaryParser(String command) -
writeTo
Description copied from interface:WriteableWrite this into the StreamOutput.- Specified by:
writeToin interfaceWriteable- Overrides:
writeToin classAbstractAllocateAllocationCommand- Throws:
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 IOException- Overrides:
extraXContentin classAbstractAllocateAllocationCommand- Throws:
IOException
-
equals
- Overrides:
equalsin classAbstractAllocateAllocationCommand
-
hashCode
public int hashCode()- Overrides:
hashCodein classAbstractAllocateAllocationCommand
-