public class MoveAllocationCommand extends java.lang.Object implements AllocationCommand
ShardRoutingState.STARTED
in order to be moved.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 |
---|
MoveAllocationCommand(StreamInput in)
Read from a stream.
|
MoveAllocationCommand(java.lang.String index,
int shardId,
java.lang.String fromNode,
java.lang.String toNode) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object obj) |
RerouteExplanation |
execute(RoutingAllocation allocation,
boolean explain)
Executes the command on a
RoutingAllocation setup |
java.lang.String |
fromNode() |
static MoveAllocationCommand |
fromXContent(XContentParser parser) |
int |
hashCode() |
java.lang.String |
index() |
java.lang.String |
name()
Get the name of the command
|
int |
shardId() |
java.lang.String |
toNode() |
XContentBuilder |
toXContent(XContentBuilder builder,
ToXContent.Params params) |
void |
writeTo(StreamOutput out)
Write this into the StreamOutput.
|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getWriteableName
isFragment
public static final java.lang.String NAME
public static final ParseField COMMAND_NAME_FIELD
public MoveAllocationCommand(java.lang.String index, int shardId, java.lang.String fromNode, java.lang.String toNode)
public MoveAllocationCommand(StreamInput in) throws java.io.IOException
java.io.IOException
public void writeTo(StreamOutput out) throws java.io.IOException
Writeable
public java.lang.String name()
AllocationCommand
name
in interface AllocationCommand
public java.lang.String index()
public int shardId()
public java.lang.String fromNode()
public java.lang.String toNode()
public RerouteExplanation execute(RoutingAllocation allocation, boolean explain)
AllocationCommand
RoutingAllocation
setupexecute
in interface AllocationCommand
allocation
- RoutingAllocation
to modifypublic XContentBuilder toXContent(XContentBuilder builder, ToXContent.Params params) throws java.io.IOException
toXContent
in interface ToXContent
java.io.IOException
public static MoveAllocationCommand fromXContent(XContentParser parser) throws java.io.IOException
java.io.IOException
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object