use of org.jgroups.JChannel 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.JChannel in project JGroups by belaban.
the class ClusterSplitLockTest method disconnectAndDestroy.
private void disconnectAndDestroy(int i) throws Exception {
JChannel channel = channels[i];
Util.close(channel);
}
use of org.jgroups.JChannel 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.JChannel in project JGroups by belaban.
the class LargeMergeTest method getStats.
protected String getStats() {
StringBuilder sb = new StringBuilder();
int merge_task_running = 0;
int merge_canceller_running = 0;
int merge_in_progress = 0;
int gms_merge_task_running = 0;
for (JChannel ch : channels) {
MERGE3 merge3 = ch.getProtocolStack().findProtocol(MERGE3.class);
if (merge3 != null && merge3.isMergeTaskRunning())
merge_task_running++;
GMS gms = ch.getProtocolStack().findProtocol(GMS.class);
if (gms.isMergeKillerRunning())
merge_canceller_running++;
if (gms.isMergeInProgress())
merge_in_progress++;
if (gms.isMergeTaskRunning())
gms_merge_task_running++;
}
sb.append("merge tasks running: " + merge_task_running).append("\n");
sb.append("merge killers running: " + merge_canceller_running).append("\n");
sb.append("merge in progress: " + merge_in_progress).append("\n");
sb.append("gms.merge tasks running: " + gms_merge_task_running).append("\n");
return sb.toString();
}
use of org.jgroups.JChannel in project JGroups by belaban.
the class ConfiguratorTest method setUp.
@BeforeMethod
void setUp() throws Exception {
ch = new JChannel(new UDP(), new PING(), new FD_ALL3(), new NAKACK2().setXmitInterval(500), new UNICAST3(), new MFC());
stack = ch.getProtocolStack();
}
Aggregations