Class TestShardRouting
java.lang.Object
org.elasticsearch.cluster.routing.TestShardRouting
A helper that allows to create shard routing instances within tests, while not requiring to expose
different simplified constructors on the ShardRouting itself.
Please do not add more `newShardRouting`, consider using a aSharRouting builder instead
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic AllocationId
static RecoverySource
static RecoverySource
buildRecoverySource
(boolean primary, ShardRoutingState state) static RelocationFailureInfo
static UnassignedInfo
buildUnassignedInfo
(String message) static UnassignedInfo
static ShardRouting
newShardRouting
(String index, int shardId, String currentNodeId, boolean primary, ShardRoutingState state) static ShardRouting
newShardRouting
(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, ShardRoutingState state) static ShardRouting
newShardRouting
(ShardId shardId, String currentNodeId, boolean primary, ShardRoutingState state) static ShardRouting
newShardRouting
(ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, ShardRoutingState state) static TestShardRouting.Builder
shardRoutingBuilder
(String index, int shardId, String currentNodeId, boolean primary, ShardRoutingState state) static TestShardRouting.Builder
shardRoutingBuilder
(ShardId shardId, String currentNodeId, boolean primary, ShardRoutingState state)
-
Constructor Details
-
TestShardRouting
public TestShardRouting()
-
-
Method Details
-
shardRoutingBuilder
public static TestShardRouting.Builder shardRoutingBuilder(String index, int shardId, String currentNodeId, boolean primary, ShardRoutingState state) -
shardRoutingBuilder
public static TestShardRouting.Builder shardRoutingBuilder(ShardId shardId, String currentNodeId, boolean primary, ShardRoutingState state) -
newShardRouting
public static ShardRouting newShardRouting(String index, int shardId, String currentNodeId, boolean primary, ShardRoutingState state) -
newShardRouting
public static ShardRouting newShardRouting(ShardId shardId, String currentNodeId, boolean primary, ShardRoutingState state) -
newShardRouting
public static ShardRouting newShardRouting(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, ShardRoutingState state) -
newShardRouting
public static ShardRouting newShardRouting(ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, ShardRoutingState state) -
buildRecoverySource
-
buildAllocationId
-
buildUnassignedInfo
-
buildRelocationFailureInfo
-
buildUnassignedInfo
-
buildRecoverySource
-