Class TestShardRouting

java.lang.Object
org.elasticsearch.cluster.routing.TestShardRouting

public class TestShardRouting extends Object
A helper that allows to create shard routing instances within tests, while not requiring to expose different simplified constructors on the ShardRouting itself.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static org.elasticsearch.cluster.routing.ShardRouting
    newShardRouting​(String index, int shardId, String currentNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state)
     
    static org.elasticsearch.cluster.routing.ShardRouting
    newShardRouting​(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state)
     
    static org.elasticsearch.cluster.routing.ShardRouting
    newShardRouting​(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.AllocationId allocationId)
     
    static org.elasticsearch.cluster.routing.ShardRouting
    newShardRouting​(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.UnassignedInfo unassignedInfo)
     
    static org.elasticsearch.cluster.routing.ShardRouting
    newShardRouting​(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state)
     
    static org.elasticsearch.cluster.routing.ShardRouting
    newShardRouting​(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.RecoverySource recoverySource)
     
    static org.elasticsearch.cluster.routing.ShardRouting
    newShardRouting​(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state)
     
    static org.elasticsearch.cluster.routing.ShardRouting
    newShardRouting​(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.AllocationId allocationId)
     
    static org.elasticsearch.cluster.routing.ShardRouting
    newShardRouting​(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.UnassignedInfo unassignedInfo)
     
    static org.elasticsearch.cluster.routing.RecoverySource
     
    static org.elasticsearch.cluster.routing.ShardRouting
    relocate​(org.elasticsearch.cluster.routing.ShardRouting shardRouting, String relocatingNodeId, long expectedShardSize)
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • TestShardRouting

      public TestShardRouting()
  • Method Details

    • newShardRouting

      public static org.elasticsearch.cluster.routing.ShardRouting newShardRouting(String index, int shardId, String currentNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state)
    • newShardRouting

      public static org.elasticsearch.cluster.routing.ShardRouting newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state)
    • newShardRouting

      public static org.elasticsearch.cluster.routing.ShardRouting newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.RecoverySource recoverySource)
    • newShardRouting

      public static org.elasticsearch.cluster.routing.ShardRouting newShardRouting(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state)
    • newShardRouting

      public static org.elasticsearch.cluster.routing.ShardRouting newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state)
    • newShardRouting

      public static org.elasticsearch.cluster.routing.ShardRouting newShardRouting(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.AllocationId allocationId)
    • newShardRouting

      public static org.elasticsearch.cluster.routing.ShardRouting newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.AllocationId allocationId)
    • newShardRouting

      public static org.elasticsearch.cluster.routing.ShardRouting newShardRouting(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.UnassignedInfo unassignedInfo)
    • newShardRouting

      public static org.elasticsearch.cluster.routing.ShardRouting newShardRouting(org.elasticsearch.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.elasticsearch.cluster.routing.ShardRoutingState state, org.elasticsearch.cluster.routing.UnassignedInfo unassignedInfo)
    • relocate

      public static org.elasticsearch.cluster.routing.ShardRouting relocate(org.elasticsearch.cluster.routing.ShardRouting shardRouting, String relocatingNodeId, long expectedShardSize)
    • randomRecoverySource

      public static org.elasticsearch.cluster.routing.RecoverySource randomRecoverySource()