Class NetworkDisruption.NetworkLinkDisruptionType
java.lang.Object
org.elasticsearch.test.disruption.NetworkDisruption.NetworkLinkDisruptionType
- Direct Known Subclasses:
NetworkDisruption.NetworkDelay
- Enclosing class:
- NetworkDisruption
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
-
Method Summary
Modifier and TypeMethodDescriptionabstract 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.core.TimeValue
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)
.
-
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.core.TimeValue expectedTimeToHeal()Returns expected time to heal after disruption has been removed. Defaults to instant healing.
-