Class NetworkDisruption.NetworkLinkDisruptionType
- java.lang.Object
-
- org.elasticsearch.test.disruption.NetworkDisruption.NetworkLinkDisruptionType
-
- Direct Known Subclasses:
NetworkDisruption.NetworkDelay,NetworkDisruption.NetworkDisconnect,NetworkDisruption.NetworkUnresponsive
- Enclosing class:
- NetworkDisruption
public abstract static class NetworkDisruption.NetworkLinkDisruptionType extends java.lang.ObjectAbstract class representing various types of network disruptions. Instances of this class override theapplyDisruption(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 voidapplyDisruption(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.TimeValueexpectedTimeToHeal()Returns expected time to heal after disruption has been removed.voidremoveDisruption(MockTransportService sourceTransportService, MockTransportService targetTransportService)Removes network disruption that was added byapplyDisruption(org.elasticsearch.test.transport.MockTransportService, org.elasticsearch.test.transport.MockTransportService).
-
-
-
Method Detail
-
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 TimeValue expectedTimeToHeal()
Returns expected time to heal after disruption has been removed. Defaults to instant healing.
-
-