use of org.jgroups.protocols.pbcast.STABLE in project fabric8 by jboss-fuse.
the class TestBase method setUp.
@Before
public void setUp() throws Exception {
for (int i = 0; i < NUM; i++) {
Protocol ping = createPing();
channels[i] = new JChannel(new TCP(), ping, new NAKACK2(), new UNICAST3(), new STABLE(), new GMS());
channels[i].setName(Character.toString((char) ('A' + i)));
channels[i].connect(CLUSTER_NAME);
channels[i].setReceiver(receivers[i] = new MyReceiver());
}
}
use of org.jgroups.protocols.pbcast.STABLE in project JGroups by belaban.
the class CustomProtocolTest method testMyProtocol.
@Test(groups = Global.FUNCTIONAL)
public static void testMyProtocol() throws Exception {
JChannel channel = new JChannel(new UDP(), new org.jgroups.tests.CustomProtocolTest.MyProtocol(), new PING(), new FD_ALL3(), new VERIFY_SUSPECT(), new NAKACK2(), new UNICAST3(), new STABLE(), new FRAG2(), new GMS());
System.out.println("channel = " + channel);
assert true;
}
use of org.jgroups.protocols.pbcast.STABLE in project JGroups by belaban.
the class LargeMergeTest method setUp.
@BeforeMethod
void setUp() throws Exception {
System.out.print("Connecting channels: ");
for (int i = 0; i < NUM; i++) {
channels[i] = new JChannel(new SHARED_LOOPBACK(), new DISCARD().discardAll(true), new SHARED_LOOPBACK_PING(), new MERGE3().setMinInterval(1000).setMaxInterval(3000).setCheckInterval(6000).setMaxParticipantsInMerge(NUM), new NAKACK2().useMcastXmit(false).logDiscardMessages(false).logNotFoundMessages(false).setXmitTableNumRows(5).setXmitTableMsgsPerRow(10), new UNICAST3().setXmitTableNumRows(5).setXmitTableMsgsPerRow(10).setConnExpiryTimeout(10000), new STABLE().setMaxBytes(500000), new GMS().printLocalAddress(false).setJoinTimeout(1).setLeaveTimeout(100).logViewWarnings(false).setViewAckCollectionTimeout(2000).logCollectMessages(false));
channels[i].setName(String.valueOf((i + 1)));
channels[i].connect("LargeMergeTest");
System.out.print(i + 1 + " ");
}
System.out.println("");
}
use of org.jgroups.protocols.pbcast.STABLE in project JGroups by belaban.
the class FragTest method createChannel.
protected static JChannel createChannel(String name, Class<? extends Fragmentation> clazz, boolean use_encr) throws Exception {
Fragmentation frag_prot = clazz.getDeclaredConstructor().newInstance();
frag_prot.setFragSize(FRAG_SIZE);
ASYM_ENCRYPT e = use_encr ? new ASYM_ENCRYPT().setChangeKeyOnLeave(false).setUseExternalKeyExchange(false) : null;
return new JChannel(new SHARED_LOOPBACK(), new SHARED_LOOPBACK_PING(), e, new NAKACK2().useMcastXmit(false), new UNICAST3(), new STABLE().setMaxBytes(50000), new GMS().setJoinTimeout(500).printLocalAddress(false), new UFC(), new MFC(), frag_prot).name(name);
}
use of org.jgroups.protocols.pbcast.STABLE in project JGroups by belaban.
the class Util method getTestStack.
/**
* Returns a default stack for testing with transport = SHARED_LOOPBACK
* @param additional_protocols Any number of protocols to add to the top of the returned protocol list
* @return
*/
public static Protocol[] getTestStack(Protocol... additional_protocols) {
Protocol[] protocols = { new SHARED_LOOPBACK(), new SHARED_LOOPBACK_PING(), new NAKACK2(), new UNICAST3(), new STABLE(), new GMS().setJoinTimeout(1000), new FRAG2().setFragSize(8000) };
if (additional_protocols == null)
return protocols;
Protocol[] tmp = Arrays.copyOf(protocols, protocols.length + additional_protocols.length);
System.arraycopy(additional_protocols, 0, tmp, protocols.length, additional_protocols.length);
return tmp;
}
Aggregations