|
|
@@ -237,13 +237,6 @@ public final class MockTransportService extends TransportService {
|
|
|
addFailToSendNoConnectRule(transportService, new HashSet<>(Arrays.asList(blockedActions)));
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Adds a rule that will cause matching operations to throw ConnectTransportExceptions
|
|
|
- */
|
|
|
- public void addFailToSendNoConnectRule(TransportAddress transportAddress, final String... blockedActions) {
|
|
|
- addFailToSendNoConnectRule(transportAddress, new HashSet<>(Arrays.asList(blockedActions)));
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Adds a rule that will cause matching operations to throw ConnectTransportExceptions
|
|
|
*/
|
|
|
@@ -413,16 +406,6 @@ public final class MockTransportService extends TransportService {
|
|
|
return transport().addSendBehavior(transportAddress, sendBehavior);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Adds a send behavior that is the default send behavior.
|
|
|
- *
|
|
|
- * @return {@code true} if no default send behavior was registered
|
|
|
- */
|
|
|
- public boolean addSendBehavior(StubbableTransport.SendRequestBehavior behavior) {
|
|
|
- return transport().setDefaultSendBehavior(behavior);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
* Adds a new connect behavior that is used for creating connections with the given delegate service.
|
|
|
*
|
|
|
@@ -445,19 +428,6 @@ public final class MockTransportService extends TransportService {
|
|
|
return transport().addConnectBehavior(transportAddress, connectBehavior);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Adds a new get connection behavior that is used for communication with the given delegate service.
|
|
|
- *
|
|
|
- * @return {@code true} if no other get connection behavior was registered for any of the addresses bound by delegate service.
|
|
|
- */
|
|
|
- public boolean addGetConnectionBehavior(TransportService transportService, StubbableConnectionManager.GetConnectionBehavior behavior) {
|
|
|
- boolean noRegistered = true;
|
|
|
- for (TransportAddress transportAddress : extractTransportAddresses(transportService)) {
|
|
|
- noRegistered &= addGetConnectionBehavior(transportAddress, behavior);
|
|
|
- }
|
|
|
- return noRegistered;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Adds a get connection behavior that is used for communication with the given delegate address.
|
|
|
*
|
|
|
@@ -476,19 +446,6 @@ public final class MockTransportService extends TransportService {
|
|
|
return connectionManager().setDefaultGetConnectionBehavior(behavior);
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * Adds a node connected behavior that is used for the given delegate service.
|
|
|
- *
|
|
|
- * @return {@code true} if no other node connected behavior was registered for any of the addresses bound by delegate service.
|
|
|
- */
|
|
|
- public boolean addNodeConnectedBehavior(TransportService transportService, StubbableConnectionManager.NodeConnectedBehavior behavior) {
|
|
|
- boolean noRegistered = true;
|
|
|
- for (TransportAddress transportAddress : extractTransportAddresses(transportService)) {
|
|
|
- noRegistered &= addNodeConnectedBehavior(transportAddress, behavior);
|
|
|
- }
|
|
|
- return noRegistered;
|
|
|
- }
|
|
|
-
|
|
|
/**
|
|
|
* Adds a node connected behavior that is used for the given delegate address.
|
|
|
*
|
|
|
@@ -538,10 +495,6 @@ public final class MockTransportService extends TransportService {
|
|
|
activeTracers.add(tracer);
|
|
|
}
|
|
|
|
|
|
- public boolean removeTracer(Tracer tracer) {
|
|
|
- return activeTracers.remove(tracer);
|
|
|
- }
|
|
|
-
|
|
|
public void clearTracers() {
|
|
|
activeTracers.clear();
|
|
|
}
|