Class TestShardRouting

java.lang.Object
org.opensearch.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.opensearch.cluster.routing.ShardRouting
    newShardRouting(String index, int shardId, String currentNodeId, boolean primary, org.opensearch.cluster.routing.ShardRoutingState state)
     
    static org.opensearch.cluster.routing.ShardRouting
    newShardRouting(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.opensearch.cluster.routing.ShardRoutingState state)
     
    static org.opensearch.cluster.routing.ShardRouting
    newShardRouting(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.opensearch.cluster.routing.ShardRoutingState state, org.opensearch.cluster.routing.AllocationId allocationId)
     
    static org.opensearch.cluster.routing.ShardRouting
    newShardRouting(String index, int shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.opensearch.cluster.routing.ShardRoutingState state, org.opensearch.cluster.routing.UnassignedInfo unassignedInfo)
     
    static org.opensearch.cluster.routing.ShardRouting
    newShardRouting(org.opensearch.core.index.shard.ShardId shardId, String currentNodeId, boolean primary, boolean searchOnly, org.opensearch.cluster.routing.ShardRoutingState state, org.opensearch.cluster.routing.RecoverySource recoverySource)
     
    static org.opensearch.cluster.routing.ShardRouting
    newShardRouting(org.opensearch.core.index.shard.ShardId shardId, String currentNodeId, boolean primary, org.opensearch.cluster.routing.ShardRoutingState state)
     
    static org.opensearch.cluster.routing.ShardRouting
    newShardRouting(org.opensearch.core.index.shard.ShardId shardId, String currentNodeId, boolean primary, org.opensearch.cluster.routing.ShardRoutingState state, org.opensearch.cluster.routing.RecoverySource recoverySource)
     
    static org.opensearch.cluster.routing.ShardRouting
    newShardRouting(org.opensearch.core.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, boolean searchOnly, org.opensearch.cluster.routing.ShardRoutingState state, org.opensearch.cluster.routing.UnassignedInfo unassignedInfo)
     
    static org.opensearch.cluster.routing.ShardRouting
    newShardRouting(org.opensearch.core.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.opensearch.cluster.routing.ShardRoutingState state)
     
    static org.opensearch.cluster.routing.ShardRouting
    newShardRouting(org.opensearch.core.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.opensearch.cluster.routing.ShardRoutingState state, org.opensearch.cluster.routing.AllocationId allocationId)
     
    static org.opensearch.cluster.routing.ShardRouting
    newShardRouting(org.opensearch.core.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.opensearch.cluster.routing.ShardRoutingState state, org.opensearch.cluster.routing.RecoverySource recoverySource, org.opensearch.cluster.routing.UnassignedInfo unassignedInfo)
     
    static org.opensearch.cluster.routing.ShardRouting
    newShardRouting(org.opensearch.core.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.opensearch.cluster.routing.ShardRoutingState state, org.opensearch.cluster.routing.UnassignedInfo unassignedInfo)
     
    static org.opensearch.cluster.routing.ShardRouting
    newShardRoutingRemoteRestore(String index, org.opensearch.core.index.shard.ShardId shardId, String currentNodeId, String relocatingNodeId, boolean primary, org.opensearch.cluster.routing.ShardRoutingState state, org.opensearch.cluster.routing.UnassignedInfo unassignedInfo)
     
    static org.opensearch.cluster.routing.RecoverySource
     
    static org.opensearch.cluster.routing.ShardRouting
    relocate(org.opensearch.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.opensearch.cluster.routing.ShardRouting newShardRouting(String index, int shardId, String currentNodeId, boolean primary, org.opensearch.cluster.routing.ShardRoutingState state)
    • newShardRouting

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

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

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

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

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

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

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

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

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

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

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

      public static org.opensearch.cluster.routing.RecoverySource randomRecoverySource()
    • newShardRouting

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

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