public class CancelAllocationCommand extends java.lang.Object implements AllocationCommand
Modifier and Type | Class and Description |
---|---|
static class |
CancelAllocationCommand.Factory
Factory creating
CancelAllocationCommand s |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME |
Constructor and Description |
---|
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() |
RerouteExplanation |
execute(RoutingAllocation allocation,
boolean explain)
Executes the command on a
RoutingAllocation setup |
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
|
public static final java.lang.String NAME
public CancelAllocationCommand(java.lang.String index, int shardId, java.lang.String node, boolean allowPrimary)
CancelAllocationCommand
index
- 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 java.lang.String name()
AllocationCommand
name
in interface AllocationCommand
public java.lang.String index()
public int shardId()
public java.lang.String node()
public boolean allowPrimary()
public RerouteExplanation execute(RoutingAllocation allocation, boolean explain)
AllocationCommand
RoutingAllocation
setupexecute
in interface AllocationCommand
allocation
- RoutingAllocation
to modify