use of com.hazelcast.nio.tcp.FirewallingMockConnectionManager in project hazelcast by hazelcast.
the class SplitBrainTestSupport method unblockCommunicationBetween.
public static void unblockCommunicationBetween(HazelcastInstance h1, HazelcastInstance h2) {
FirewallingMockConnectionManager h1CM = getFireWalledConnectionManager(h1);
FirewallingMockConnectionManager h2CM = getFireWalledConnectionManager(h2);
Node h1Node = getNode(h1);
Node h2Node = getNode(h2);
h1CM.unblock(h2Node.getThisAddress());
h2CM.unblock(h1Node.getThisAddress());
}
use of com.hazelcast.nio.tcp.FirewallingMockConnectionManager in project hazelcast by hazelcast.
the class PartitionedCluster method splitCluster.
private void splitCluster() {
Node n1 = getNode(h1);
Node n2 = getNode(h2);
Node n3 = getNode(h3);
Node n4 = getNode(h4);
Node n5 = getNode(h5);
FirewallingMockConnectionManager cm1 = getConnectionManager(n1);
FirewallingMockConnectionManager cm2 = getConnectionManager(n2);
FirewallingMockConnectionManager cm3 = getConnectionManager(n3);
FirewallingMockConnectionManager cm4 = getConnectionManager(n4);
FirewallingMockConnectionManager cm5 = getConnectionManager(n5);
cm1.block(n4.address);
cm2.block(n4.address);
cm3.block(n4.address);
cm1.block(n5.address);
cm2.block(n5.address);
cm3.block(n5.address);
cm4.block(n1.address);
cm4.block(n2.address);
cm4.block(n3.address);
cm5.block(n1.address);
cm5.block(n2.address);
cm5.block(n3.address);
n4.clusterService.removeAddress(n1.address, null);
n4.clusterService.removeAddress(n2.address, null);
n4.clusterService.removeAddress(n3.address, null);
n5.clusterService.removeAddress(n1.address, null);
n5.clusterService.removeAddress(n2.address, null);
n5.clusterService.removeAddress(n3.address, null);
n1.clusterService.removeAddress(n4.address, null);
n2.clusterService.removeAddress(n4.address, null);
n3.clusterService.removeAddress(n4.address, null);
n1.clusterService.removeAddress(n5.address, null);
n2.clusterService.removeAddress(n5.address, null);
n3.clusterService.removeAddress(n5.address, null);
}
use of com.hazelcast.nio.tcp.FirewallingMockConnectionManager in project hazelcast by hazelcast.
the class SplitBrainTestSupport method blockCommunicationBetween.
public static void blockCommunicationBetween(HazelcastInstance h1, HazelcastInstance h2) {
FirewallingMockConnectionManager h1CM = getFireWalledConnectionManager(h1);
FirewallingMockConnectionManager h2CM = getFireWalledConnectionManager(h2);
Node h1Node = getNode(h1);
Node h2Node = getNode(h2);
h1CM.block(h2Node.getThisAddress());
h2CM.block(h1Node.getThisAddress());
}
use of com.hazelcast.nio.tcp.FirewallingMockConnectionManager in project hazelcast by hazelcast.
the class AntiEntropyCorrectnessTest method setBackupPacketDropFilter.
public static void setBackupPacketDropFilter(HazelcastInstance instance, float blockRatio) {
Node node = getNode(instance);
FirewallingMockConnectionManager cm = (FirewallingMockConnectionManager) node.getConnectionManager();
cm.setDroppingPacketFilter(new BackupPacketDropFilter(node.getSerializationService(), blockRatio));
}
use of com.hazelcast.nio.tcp.FirewallingMockConnectionManager in project hazelcast by hazelcast.
the class DirtyBackupTest method setBackupPacketReorderFilter.
private static void setBackupPacketReorderFilter(HazelcastInstance instance) {
Node node = getNode(instance);
FirewallingMockConnectionManager cm = (FirewallingMockConnectionManager) node.getConnectionManager();
cm.setDelayingPacketFilter(new BackupPacketReorderFilter(node.getSerializationService()));
}
Aggregations