Class NetworkDisruption.NetworkDelay

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

public static class NetworkDisruption.NetworkDelay
extends NetworkDisruption.NetworkLinkDisruptionType
Simulates slow or congested network. Delivery of requests that are sent from source to target node are delayed by a configurable time amount.
  • Field Summary

    Fields 
    Modifier and Type Field Description
    static org.elasticsearch.common.unit.TimeValue DEFAULT_DELAY_MAX  
    static org.elasticsearch.common.unit.TimeValue DEFAULT_DELAY_MIN  
  • Constructor Summary

    Constructors 
    Constructor Description
    NetworkDelay​(org.elasticsearch.common.unit.TimeValue delay)
    Delays requests by a fixed time value.
  • Method Summary

    Modifier and Type Method Description
    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.
    org.elasticsearch.common.unit.TimeValue expectedTimeToHeal()
    Returns expected time to heal after disruption has been removed.
    static NetworkDisruption.NetworkDelay random​(java.util.Random random)
    Delays requests by a random but fixed time value between DEFAULT_DELAY_MIN and DEFAULT_DELAY_MAX.
    static NetworkDisruption.NetworkDelay random​(java.util.Random random, org.elasticsearch.common.unit.TimeValue delayMin, org.elasticsearch.common.unit.TimeValue delayMax)
    Delays requests by a random but fixed time value between delayMin and delayMax.
    java.lang.String toString()  

    Methods inherited from class org.elasticsearch.test.disruption.NetworkDisruption.NetworkLinkDisruptionType

    removeDisruption

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait