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 AllocationService
A lock
AllocationService
allowing tests to override time-
Nested Class Summary
Nested classes/interfaces inherited from class org.elasticsearch.cluster.routing.allocation.AllocationService
AllocationService.CommandsResult
-
Constructor Summary
Constructors Constructor Description MockAllocationService(AllocationDeciders allocationDeciders, GatewayAllocator gatewayAllocator, ShardsAllocator shardsAllocator, 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, firstListElementsToCommaDelimitedString, reroute, reroute, setGatewayAllocator
-
Constructor Details
-
MockAllocationService
public MockAllocationService(AllocationDeciders allocationDeciders, GatewayAllocator gatewayAllocator, ShardsAllocator shardsAllocator, ClusterInfoService clusterInfoService)
-
-
Method Details
-
setNanoTimeOverride
public void setNanoTimeOverride(long nanoTime) -
currentNanoTime
protected long currentNanoTime()- Overrides:
currentNanoTime
in classAllocationService
-