Package org.jgroups.protocols.pbcast

Examples of org.jgroups.protocols.pbcast.NAKACK2$Counter


    }
   
    protected JChannel createChannel(String name) throws Exception {
        JChannel retval=new JChannel(new SHARED_LOOPBACK(),
                                     new SHARED_LOOPBACK_PING(),
                                     new NAKACK2().setValue("use_mcast_xmit",false)
                                       .setValue("log_discard_msgs",false).setValue("log_not_found_msgs",false),
                                     new UNICAST3(),
                                     new STABLE().setValue("max_bytes",50000),
                                     new GMS().setValue("print_local_addr",false)
                                       .setValue("join_timeout", 100)
View Full Code Here


        Collections.sort(members);
        Address coord=members.get(0);
        View view=new View(coord, 0, members);
        MutableDigest digest=new MutableDigest(view.getMembersRaw());
        for(JChannel ch: channels) {
            NAKACK2 nakack=(NAKACK2)ch.getProtocolStack().findProtocol(NAKACK2.class);
            digest.merge(nakack.getDigest(ch.getAddress()));
        }
        for(JChannel ch: channels) {
            GMS gms=(GMS)ch.getProtocolStack().findProtocol(GMS.class);
            System.out.println("Injecting view " + view + " into " + ch.getAddress());
            gms.installView(view, digest);
View Full Code Here


    protected JChannel createChannel(String name) throws Exception {
        JChannel ch=Util.createChannel(new SHARED_LOOPBACK(),
                                       new PING(),
                                       new NAKACK2().setValue("become_server_queue_size", 10),
                                       new UNICAST3(),
                                       new GMS().setValue("print_local_addr", false).setValue("join_timeout", 500));
        ch.setName(name);
        return ch;
    }
View Full Code Here


    protected JChannel createChannel(final String name, final String cluster_name) throws Exception {
        JChannel retval=new JChannel(new SHARED_LOOPBACK(),
                                     new SHARED_LOOPBACK_PING(),
                                     new NAKACK2(),
                                     new UNICAST3(),
                                     new GMS(),
                                     new FORWARD_TO_COORD());
        retval.setName(name);
        retval.connect(cluster_name);
View Full Code Here

        }
    }

    private static void printDigests(JChannel[] channels) {
        for(JChannel ch: channels) {
            NAKACK2 nak=(NAKACK2)ch.getProtocolStack().findProtocol(NAKACK2.class);
            Digest digest=nak.getDigest();
            System.out.println(ch.getName() + ": " + digest.toString());
        }
    }
View Full Code Here

        Protocol unicast=unicast_class.newInstance();
        if(unicast instanceof UNICAST2)
            unicast.setValue("stable_interval", 1000);
        return new JChannel(new SHARED_LOOPBACK().setValue("enable_batching", true),
                            new SHARED_LOOPBACK_PING(),
                            new NAKACK2().setValue("use_mcast_xmit", false),
                            new DISCARD(),
                            unicast.setValue("xmit_interval", 500),
                            new GMS().setValue("print_local_addr", false))
          .name(name);
    }
View Full Code Here

        tunnel.setGossipRouterHosts(gossip_router_hosts);
        List<Protocol> protocols=new ArrayList<Protocol>();
        protocols.addAll(Arrays.asList(tunnel,new PING(),new MERGE3().setValue("min_interval",1000).setValue("max_interval",3000)));
        if(include_failure_detection)
            protocols.addAll(Arrays.asList(new FD().setValue("timeout", 2000).setValue("max_tries", 2), new VERIFY_SUSPECT()));
        protocols.addAll(Arrays.asList(new NAKACK2().setValue("use_mcast_xmit", false), new UNICAST3(), new STABLE(),
                                       new GMS().joinTimeout(10)));
        JChannel ch=new JChannel(protocols);
        if(name != null)
            ch.setName(name);
        return ch;
View Full Code Here

        if(unicast instanceof UNICAST2)
            unicast.setValue("stable_interval", 1000);
        return new JChannel(
          new SHARED_LOOPBACK(),
          new SHARED_LOOPBACK_PING(),
          new NAKACK2(),
          new DISCARD(),
          unicast,
          new GMS())
          .name(name);
    }
View Full Code Here

    protected static Protocol[] props() {
        return new Protocol[]{
          new SHARED_LOOPBACK().setValue("bundler_type", "sender-sends").setValue("ignore_dont_bundle", false),
          new SHARED_LOOPBACK_PING(),
          new NAKACK2(),
          new UNICAST3().setValue("conn_expiry_timeout", 0).setValue("conn_close_timeout", 0),
          new STABLE(),
          new GMS()};
    }
View Full Code Here

    protected static void change(JChannel ... channels) {
        for(JChannel ch: channels) {
            TP transport=ch.getProtocolStack().getTransport();
            transport.setMaxBundleSize(MAX_BUNDLE_SIZE);
            NAKACK2 nak=(NAKACK2)ch.getProtocolStack().findProtocol(NAKACK2.class);
            if(nak == null)
                throw new IllegalStateException("NAKACK2 not present in the stack");
            nak.setValue("max_xmit_req_size", 5000);
            nak.setValue("max_msg_batch_size", 10000);
        }
    }
View Full Code Here

TOP

Related Classes of org.jgroups.protocols.pbcast.NAKACK2$Counter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.