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