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 Summary
Constructors Constructor Description NetworkLinkDisruptionType()
-
Method Summary
Modifier and Type Method Description 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.org.elasticsearch.common.unit.TimeValue
expectedTimeToHeal()
Returns expected time to heal after disruption has been removed.void
removeDisruption(MockTransportService sourceTransportService, MockTransportService targetTransportService)
Removes network disruption that was added byapplyDisruption(org.elasticsearch.test.transport.MockTransportService, org.elasticsearch.test.transport.MockTransportService)
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
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 senttargetTransportService
- target transport service to which requests are sent
-
removeDisruption
public void removeDisruption(MockTransportService sourceTransportService, MockTransportService targetTransportService)Removes network disruption that was added byapplyDisruption(org.elasticsearch.test.transport.MockTransportService, org.elasticsearch.test.transport.MockTransportService)
.- Parameters:
sourceTransportService
- source transport service from which requests are senttargetTransportService
- 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.
-