Search in sources :

Example 31 with STABLE

use of org.jgroups.protocols.pbcast.STABLE in project JGroups by belaban.

the class MergeTest3 method createChannel.

protected static JChannel createChannel(String name) throws Exception {
    JChannel retval = new JChannel(new SHARED_LOOPBACK(), new DISCARD().discardAll(true), new SHARED_LOOPBACK_PING(), new NAKACK2().useMcastXmit(false).logDiscardMessages(false).logNotFoundMessages(false), new UNICAST3(), new STABLE().setMaxBytes(50000), new GMS().printLocalAddress(false).setJoinTimeout(1).setLeaveTimeout(100).setMergeTimeout(5000).logViewWarnings(false).setViewAckCollectionTimeout(50).logCollectMessages(false)).name(name);
    retval.connect("MergeTest3");
    JmxConfigurator.registerChannel(retval, Util.getMBeanServer(), name, retval.getClusterName(), true);
    return retval;
}
Also used : SHARED_LOOPBACK(org.jgroups.protocols.SHARED_LOOPBACK) NAKACK2(org.jgroups.protocols.pbcast.NAKACK2) DISCARD(org.jgroups.protocols.DISCARD) SHARED_LOOPBACK_PING(org.jgroups.protocols.SHARED_LOOPBACK_PING) STABLE(org.jgroups.protocols.pbcast.STABLE) GMS(org.jgroups.protocols.pbcast.GMS) UNICAST3(org.jgroups.protocols.UNICAST3)

Example 32 with STABLE

use of org.jgroups.protocols.pbcast.STABLE in project JGroups by belaban.

the class FCTest method setUp.

protected void setUp(Class<? extends FlowControl> flow_control_class) throws Exception {
    FlowControl f = flow_control_class.getDeclaredConstructor().newInstance();
    f.setMinCredits(1000).setMaxCredits(10000).setMaxBlockTime(1000);
    ch = new JChannel(new SHARED_LOOPBACK(), new SHARED_LOOPBACK_PING(), new NAKACK2().useMcastXmit(false), new UNICAST3(), new STABLE().setMaxBytes(50000), new GMS().printLocalAddress(false), f, new FRAG2().setFragSize(800));
    ch.connect("FCTest");
}
Also used : NAKACK2(org.jgroups.protocols.pbcast.NAKACK2) STABLE(org.jgroups.protocols.pbcast.STABLE) GMS(org.jgroups.protocols.pbcast.GMS)

Example 33 with STABLE

use of org.jgroups.protocols.pbcast.STABLE in project JGroups by belaban.

the class FrozenCoordinatorTest method create.

protected JChannel create(String name) throws Exception {
    FILE_PING ping = new FILE_PING().setLocation(root_dir.toString()).removeAllDataOnViewChange(true);
    Protocol[] protocols = { new SHARED_LOOPBACK(), ping, new NAKACK2(), new UNICAST3(), new STABLE(), new GMS().setJoinTimeout(1000).setMaxJoinAttempts(5) };
    return new JChannel(protocols).name(name);
}
Also used : SHARED_LOOPBACK(org.jgroups.protocols.SHARED_LOOPBACK) FILE_PING(org.jgroups.protocols.FILE_PING) NAKACK2(org.jgroups.protocols.pbcast.NAKACK2) JChannel(org.jgroups.JChannel) STABLE(org.jgroups.protocols.pbcast.STABLE) Protocol(org.jgroups.stack.Protocol) GMS(org.jgroups.protocols.pbcast.GMS) UNICAST3(org.jgroups.protocols.UNICAST3)

Example 34 with STABLE

use of org.jgroups.protocols.pbcast.STABLE in project JGroups by belaban.

the class MergeTest6 method createChannel.

protected static JChannel createChannel(int num) throws Exception {
    JChannel ch = new JChannel(new SHARED_LOOPBACK(), new SHARED_LOOPBACK_PING(), new MERGE3().setMinInterval(3000).setMaxInterval(4000).setCheckInterval(7000), new FD_ALL3().setTimeout(8000).setInterval(3000), new NAKACK2().useMcastXmit(false).logDiscardMessages(false).logNotFoundMessages(false), new UNICAST3(), new STABLE().setMaxBytes(50000), new GMS().printLocalAddress(false).setJoinTimeout(100).setLeaveTimeout(100).setMergeTimeout(5000).logViewWarnings(false).setViewAckCollectionTimeout(50).logCollectMessages(false)).name(String.valueOf(num));
    // the address generator makes sure that 2's UUID is lower than 3's UUID, so 2 is chosen as merge leader
    ch.addAddressGenerator(() -> new UUID(0, num));
    return ch.connect("MergeTest6");
}
Also used : NAKACK2(org.jgroups.protocols.pbcast.NAKACK2) STABLE(org.jgroups.protocols.pbcast.STABLE) GMS(org.jgroups.protocols.pbcast.GMS)

Aggregations

STABLE (org.jgroups.protocols.pbcast.STABLE)34 NAKACK2 (org.jgroups.protocols.pbcast.NAKACK2)29 GMS (org.jgroups.protocols.pbcast.GMS)27 JChannel (org.jgroups.JChannel)15 Protocol (org.jgroups.stack.Protocol)13 UNICAST3 (org.jgroups.protocols.UNICAST3)6 ArrayList (java.util.ArrayList)4 SHARED_LOOPBACK (org.jgroups.protocols.SHARED_LOOPBACK)3 DISCARD (org.jgroups.protocols.DISCARD)2 SHARED_LOOPBACK_PING (org.jgroups.protocols.SHARED_LOOPBACK_PING)2 TCP (org.jgroups.protocols.TCP)2 BeforeMethod (org.testng.annotations.BeforeMethod)2 Test (org.testng.annotations.Test)2 InetAddress (java.net.InetAddress)1 InetSocketAddress (java.net.InetSocketAddress)1 SecureRandom (java.security.SecureRandom)1 List (java.util.List)1 Properties (java.util.Properties)1 CountDownLatch (java.util.concurrent.CountDownLatch)1 AtomicInteger (java.util.concurrent.atomic.AtomicInteger)1