public class CancelAllocationCommand extends java.lang.Object implements AllocationCommand
AllocationCommand.Parser<T extends AllocationCommand>Writeable.Reader<V>, Writeable.Writer<V>ToXContent.DelegatingMapParams, ToXContent.MapParams, ToXContent.Params| Modifier and Type | Field and Description |
|---|---|
static ParseField |
COMMAND_NAME_FIELD |
static java.lang.String |
NAME |
EMPTY_PARAMS| Constructor and Description |
|---|
CancelAllocationCommand(StreamInput in)
Read from a stream.
|
CancelAllocationCommand(java.lang.String index,
int shardId,
java.lang.String node,
boolean allowPrimary)
Creates a new
CancelAllocationCommand |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowPrimary() |
boolean |
equals(java.lang.Object obj) |
RerouteExplanation |
execute(RoutingAllocation allocation,
boolean explain)
Executes the command on a
RoutingAllocation setup |
static CancelAllocationCommand |
fromXContent(XContentParser parser) |
int |
hashCode() |
java.lang.String |
index()
Get the index of the shard which allocation should be canceled
|
java.lang.String |
name()
Get the name of the command
|
java.lang.String |
node()
Get the id of the node that manages the shard which allocation should be canceled
|
int |
shardId()
Get the id of the shard which allocation should be canceled
|
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetWriteableNameisFragmentpublic static final java.lang.String NAME
public static final ParseField COMMAND_NAME_FIELD
public CancelAllocationCommand(java.lang.String index,
int shardId,
java.lang.String node,
boolean allowPrimary)
CancelAllocationCommandindex - index of the shard which allocation should be canceledshardId - id of the shard which allocation should be cancelednode - id of the node that manages the shard which allocation should be canceledpublic CancelAllocationCommand(StreamInput in) throws java.io.IOException
java.io.IOExceptionpublic void writeTo(StreamOutput out) throws java.io.IOException
Writeablepublic java.lang.String name()
AllocationCommandname in interface AllocationCommandpublic java.lang.String index()
public int shardId()
public java.lang.String node()
public boolean allowPrimary()
public RerouteExplanation execute(RoutingAllocation allocation, boolean explain)
AllocationCommandRoutingAllocation setupexecute in interface AllocationCommandallocation - RoutingAllocation to modifypublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent in interface ToXContentjava.io.IOExceptionpublic static CancelAllocationCommand fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOExceptionpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object