Examples of installView()


Examples of org.jgroups.protocols.pbcast.GMS.installView()

            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);
            gms.installView(view, digest);
        }
    }

    protected List<Address> getMembers(JChannel ... channels) {
        List<Address> members=new ArrayList<Address>(channels.length);
View Full Code Here

Examples of org.jgroups.protocols.pbcast.GMS.installView()

            ViewId new_vid=new ViewId(ch.getAddress(),vid.getId() + 1);
            View new_view=new View(new_vid,members);

            // inject view in which the shut down member is the only element
            GMS gms=(GMS)stack.findProtocol(GMS.class);
            gms.installView(new_view);
        }
        Util.close(ch);
    }

View Full Code Here

Examples of org.jgroups.protocols.pbcast.GMS.installView()

    }

    protected static void injectViewAndDigest(View view, Digest digest, JChannel ... channels) {
        for(JChannel ch: channels) {
            GMS gms=(GMS)ch.getProtocolStack().findProtocol(GMS.class);
            gms.installView(view);

            Protocol nak=ch.getProtocolStack().findProtocol(NAKACK.class, NAKACK2.class);
            if(nak != null)
                nak.down(new Event(Event.SET_DIGEST, digest));
        }
View Full Code Here

Examples of org.jgroups.protocols.pbcast.GMS.installView()

        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());
View Full Code Here

Examples of org.jgroups.protocols.pbcast.GMS.installView()

            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);
        }
    }

    protected List<Address> getMembers(JChannel ... channels) {
        List<Address> members=new ArrayList<Address>(channels.length);
View Full Code Here

Examples of org.jgroups.protocols.pbcast.GMS.installView()

        // 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

Examples of org.jgroups.protocols.pbcast.GMS.installView()

     */
    private static void applyView(JChannel[] channels, String member, String ... members) throws Exception {
        JChannel ch=findChannel(member, channels);
        View view=createView(members, channels);
        GMS gms=(GMS)ch.getProtocolStack().findProtocol(GMS.class);
        gms.installView(view);
    }


    private static boolean allChannelsHaveViewOf(JChannel[] channels, int count) {
        for(JChannel ch: channels) {
View Full Code Here

Examples of org.jgroups.protocols.pbcast.GMS.installView()

            Collection<Address> members=view.getMembers();
            for(JChannel ch: channels) {
                Address addr=ch.getAddress();
                if(members.contains(addr)) {
                    GMS gms=(GMS)ch.getProtocolStack().findProtocol(GMS.class);
                    gms.installView(view);
                }
            }
        }
    }
View Full Code Here

Examples of org.jgroups.protocols.pbcast.GMS.installView()

    /** Creates a singleton view for each channel listed and injects it */
    protected static void createPartition(JChannel ... channels) {
        for(JChannel ch: channels) {
            View view=View.create(ch.getAddress(), 5, ch.getAddress());
            GMS gms=(GMS)ch.getProtocolStack().findProtocol(GMS.class);
            gms.installView(view);
        }
    }


    protected void waitForBridgeView(int expected_size, long timeout, long interval, JChannel ... channels) {
View Full Code Here

Examples of org.jgroups.protocols.pbcast.GMS.installView()

        }

        for(JChannel ch: channels) {
            View view=View.create(ch.getAddress(), 10, ch.getAddress());
            GMS gms=(GMS)ch.getProtocolStack().findProtocol(GMS.class);
            gms.installView(view);
        }
    }


    private static void injectMergeEvent(JChannel[] channels, String leader, String ... coordinators) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.