Class OpenSearchAllocationTestCase.MockAllocationService
java.lang.Object
org.opensearch.cluster.routing.allocation.AllocationService
org.opensearch.cluster.OpenSearchAllocationTestCase.MockAllocationService
- Enclosing class:
OpenSearchAllocationTestCase
protected static class OpenSearchAllocationTestCase.MockAllocationService
extends org.opensearch.cluster.routing.allocation.AllocationService
A lock
AllocationService allowing tests to override time-
Nested Class Summary
Nested classes/interfaces inherited from class org.opensearch.cluster.routing.allocation.AllocationService
org.opensearch.cluster.routing.allocation.AllocationService.CommandsResult -
Constructor Summary
ConstructorsConstructorDescriptionMockAllocationService(org.opensearch.cluster.routing.allocation.decider.AllocationDeciders allocationDeciders, org.opensearch.gateway.GatewayAllocator gatewayAllocator, org.opensearch.cluster.routing.allocation.allocator.ShardsAllocator shardsAllocator, org.opensearch.cluster.ClusterInfoService clusterInfoService, org.opensearch.snapshots.SnapshotsInfoService snapshotsInfoService) -
Method Summary
Methods inherited from class org.opensearch.cluster.routing.allocation.AllocationService
adaptAutoExpandReplicas, applyFailedShard, applyFailedShards, applyFailedShards, applyStartedShards, buildResultAndLogHealthChange, cleanCaches, disassociateDeadNodes, explainShardAllocation, firstListElementsToCommaDelimitedString, getNumberOfInFlightFetches, reroute, reroute, setExistingShardsAllocators
-
Constructor Details
-
MockAllocationService
public MockAllocationService(org.opensearch.cluster.routing.allocation.decider.AllocationDeciders allocationDeciders, org.opensearch.gateway.GatewayAllocator gatewayAllocator, org.opensearch.cluster.routing.allocation.allocator.ShardsAllocator shardsAllocator, org.opensearch.cluster.ClusterInfoService clusterInfoService, org.opensearch.snapshots.SnapshotsInfoService snapshotsInfoService)
-
-
Method Details
-
setNanoTimeOverride
public void setNanoTimeOverride(long nanoTime) -
currentNanoTime
protected long currentNanoTime()- Overrides:
currentNanoTimein classorg.opensearch.cluster.routing.allocation.AllocationService
-