Class NetworkDisruption.NetworkLinkDisruptionType

java.lang.Object
org.elasticsearch.test.disruption.NetworkDisruption.NetworkLinkDisruptionType
Direct Known Subclasses:
NetworkDisruption.NetworkDelay
Enclosing class:
NetworkDisruption

public abstract static class NetworkDisruption.NetworkLinkDisruptionType
extends java.lang.Object
Abstract class representing various types of network disruptions. Instances of this class override the applyDisruption(org.elasticsearch.test.transport.MockTransportService, org.elasticsearch.test.transport.MockTransportService) method to apply their specific disruption type to requests that are send from a source to a target node.
  • Constructor Details

    • NetworkLinkDisruptionType

      public NetworkLinkDisruptionType()
  • Method Details

    • applyDisruption

      public abstract void applyDisruption​(MockTransportService sourceTransportService, MockTransportService targetTransportService)
      Applies network disruption for requests send from the node represented by the source transport service to the node represented by the target transport service.
      Parameters:
      sourceTransportService - source transport service from which requests are sent
      targetTransportService - target transport service to which requests are sent
    • removeDisruption

      public void removeDisruption​(MockTransportService sourceTransportService, MockTransportService targetTransportService)
      Parameters:
      sourceTransportService - source transport service from which requests are sent
      targetTransportService - target transport service to which requests are sent
    • expectedTimeToHeal

      public org.elasticsearch.common.unit.TimeValue expectedTimeToHeal()
      Returns expected time to heal after disruption has been removed. Defaults to instant healing.