Package org.elasticsearch.cluster
Class ESAllocationTestCase.MockAllocationService
java.lang.Object
org.elasticsearch.cluster.routing.allocation.AllocationService
org.elasticsearch.cluster.ESAllocationTestCase.MockAllocationService
- Enclosing class:
- ESAllocationTestCase
protected static class ESAllocationTestCase.MockAllocationService
extends org.elasticsearch.cluster.routing.allocation.AllocationService
A lock
AllocationService
allowing tests to override time-
Nested Class Summary
-
Constructor Summary
Constructors Constructor Description MockAllocationService(org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders allocationDeciders, org.elasticsearch.gateway.GatewayAllocator gatewayAllocator, org.elasticsearch.cluster.routing.allocation.allocator.ShardsAllocator shardsAllocator, org.elasticsearch.cluster.ClusterInfoService clusterInfoService)
-
Method Summary
Modifier and Type Method Description protected long
currentNanoTime()
void
setNanoTimeOverride(long nanoTime)
Methods inherited from class org.elasticsearch.cluster.routing.allocation.AllocationService
adaptAutoExpandReplicas, applyFailedShard, applyFailedShards, applyFailedShards, applyStartedShards, buildResultAndLogHealthChange, cleanCaches, disassociateDeadNodes, explainShardAllocation, firstListElementsToCommaDelimitedString, getNumberOfInFlightFetches, reroute, reroute, setExistingShardsAllocators
-
Constructor Details
-
MockAllocationService
public MockAllocationService(org.elasticsearch.cluster.routing.allocation.decider.AllocationDeciders allocationDeciders, org.elasticsearch.gateway.GatewayAllocator gatewayAllocator, org.elasticsearch.cluster.routing.allocation.allocator.ShardsAllocator shardsAllocator, org.elasticsearch.cluster.ClusterInfoService clusterInfoService)
-
-
Method Details
-
setNanoTimeOverride
public void setNanoTimeOverride(long nanoTime) -
currentNanoTime
protected long currentNanoTime()- Overrides:
currentNanoTime
in classorg.elasticsearch.cluster.routing.allocation.AllocationService
-