public class AllocateAllocationCommand extends Object implements AllocationCommand
| Modifier and Type | Class and Description |
|---|---|
static class |
AllocateAllocationCommand.Factory |
| Constructor and Description |
|---|
AllocateAllocationCommand(ShardId shardId,
String node,
boolean allowPrimary)
Create a new
AllocateAllocationCommand |
| Modifier and Type | Method and Description |
|---|---|
boolean |
allowPrimary()
Determine if primary allocation is allowed
|
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
|
ShardId |
shardId()
Get the shards id
|
public static final String NAME
public AllocateAllocationCommand(ShardId shardId, String node, boolean allowPrimary)
AllocateAllocationCommandshardId - ShardId of the shrad to assignnode - Node to assign the shard toallowPrimary - should the node be allow to allocate the shard as primarypublic String name()
AllocationCommandname in interface AllocationCommandpublic ShardId shardId()
public String node()
public boolean allowPrimary()
true if primary allocation is allowed. Otherwise falsepublic RerouteExplanation execute(RoutingAllocation allocation, boolean explain)
AllocationCommandRoutingAllocation setupexecute in interface AllocationCommandallocation - RoutingAllocation to modifyCopyright © 2009–2016. All rights reserved.