public class CancelAllocationCommand extends Object implements AllocationCommand
Modifier and Type | Class and Description |
---|---|
static class |
CancelAllocationCommand.Factory
Factory creating
CancelAllocationCommand s |
Constructor and Description |
---|
CancelAllocationCommand(ShardId shardId,
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 |
String |
name()
Get the name of the command
|
String |
node()
Get the id of the node that manages the shard which allocation should be canceled
|
ShardId |
shardId()
Get the id of the shard which allocation should be canceled
|
public static final String NAME
public CancelAllocationCommand(ShardId shardId, String node, boolean allowPrimary)
CancelAllocationCommand
shardId
- id of the shard which allocation should be cancelednode
- id of the node that manages the shard which allocation should be canceledpublic String name()
AllocationCommand
name
in interface AllocationCommand
public ShardId shardId()
public String node()
public boolean allowPrimary()
public RerouteExplanation execute(RoutingAllocation allocation, boolean explain)
AllocationCommand
RoutingAllocation
setupexecute
in interface AllocationCommand
allocation
- RoutingAllocation
to modifyCopyright © 2009–2017. All rights reserved.