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

    Nested classes/interfaces inherited from class org.elasticsearch.cluster.routing.allocation.AllocationService

    org.elasticsearch.cluster.routing.allocation.AllocationService.CommandsResult
  • 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, org.elasticsearch.snapshots.SnapshotsInfoService snapshotsInfoService)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    protected long
     
    void
    setNanoTimeOverride​(long nanoTime)
     

    Methods inherited from class org.elasticsearch.cluster.routing.allocation.AllocationService

    adaptAutoExpandReplicas, applyFailedShard, applyFailedShards, applyFailedShards, applyStartedShards, cleanCaches, disassociateDeadNodes, explainShardAllocation, firstListElementsToCommaDelimitedString, getNumberOfInFlightFetches, reroute, reroute, setExistingShardsAllocators

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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, org.elasticsearch.snapshots.SnapshotsInfoService snapshotsInfoService)
  • Method Details

    • setNanoTimeOverride

      public void setNanoTimeOverride(long nanoTime)
    • currentNanoTime

      protected long currentNanoTime()
      Overrides:
      currentNanoTime in class org.elasticsearch.cluster.routing.allocation.AllocationService