Package org.jgroups.protocols.pbcast

Examples of org.jgroups.protocols.pbcast.GMS$Request


        }
        return digest;
    }

    protected static void makeCoordinator(JChannel ch) {
        GMS gms=(GMS)ch.getProtocolStack().findProtocol(GMS.class);
        gms.becomeCoordinator();
    }
View Full Code Here


                                 gossip,
                                 new MERGE3().setValue("min_interval",1000).setValue("max_interval",3000),
                                 new FD().setValue("timeout",2000).setValue("max_tries",2),
                                 new VERIFY_SUSPECT(),
                                 new NAKACK2().setValue("use_mcast_xmit",false),
                                 new UNICAST3(), new STABLE(), new GMS().joinTimeout(1000));
        if(name != null)
            ch.setName(name);
        return ch;
    }
View Full Code Here

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

       
        MutableDigest digest=new MutableDigest(coord_view.getMembersRaw());
        NAKACK2 nakack=(NAKACK2)coord_channel.getProtocolStack().findProtocol(NAKACK2.class);
        digest.merge(nakack.getDigest(coord));
       
        GMS gms=(GMS)coord_channel.getProtocolStack().findProtocol(GMS.class);
        gms.installView(coord_view, digest);
        System.out.println("gms.getView() " + gms.getView());
       
        System.out.println("Views are:");
        for(JChannel ch: Arrays.asList(a,b,c,d))
            System.out.println(ch.getAddress() + ": " + ch.getView());
       
        JChannel merge_leader=findChannel(coord);
        MyReceiver receiver=new MyReceiver();
        merge_leader.setReceiver(receiver);

        System.out.println("merge_leader: " + merge_leader.getAddressAsString());
       
        System.out.println("Injecting MERGE event into merge leader " + merge_leader.getAddress());
        Map<Address,View> merge_views=new HashMap<Address,View>(4);
        merge_views.put(a.getAddress(), a.getView());
        merge_views.put(b.getAddress(), b.getView());
        merge_views.put(c.getAddress(), c.getView());
        merge_views.put(d.getAddress(), d.getView());
       
        gms=(GMS)merge_leader.getProtocolStack().findProtocol(GMS.class);
        gms.up(new Event(Event.MERGE, merge_views));
       
        Util.waitUntilAllChannelsHaveSameSize(10000000, 1000, a,b,c,d);
       
        System.out.println("Views are:");
        for(JChannel ch: Arrays.asList(a,b,c,d)) {
View Full Code Here

                                     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)
                                       .setValue("leave_timeout", 100)
                                       .setValue("merge_timeout",5000)
                                       .setValue("log_view_warnings",false)
                                       .setValue("view_ack_collection_timeout",50)
View Full Code Here

        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

    private static void setBundling(JChannel ch, int max_bytes, long timeout) {
        ProtocolStack stack=ch.getProtocolStack();
        TP transport=stack.getTransport();
        transport.setMaxBundleSize(max_bytes);
        transport.setMaxBundleTimeout(timeout);
        GMS gms=(GMS)stack.findProtocol(GMS.class);
        gms.setViewAckCollectionTimeout(LATENCY * 2);
        gms.setJoinTimeout(LATENCY * 2);
    }
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

        // now inject view B={B,C} into B and C
        View view=View.create(b.getAddress(), 5, b.getAddress(), c.getAddress());
        System.out.println("Injecting view " + view + " into B and C");
        for(JChannel ch: Arrays.asList(c,b)) {
            GMS gms=(GMS)ch.getProtocolStack().findProtocol(GMS.class);
            gms.installView(view);
        }

        // Now wait for the view change, the sending of new messages 2-5 and the resending of 1, and make sure
        // 1 is delivered before 2-5
        List<Integer> list_b=rb.getList();
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);
        return retval;
    }
View Full Code Here

TOP

Related Classes of org.jgroups.protocols.pbcast.GMS$Request

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.