Examples of insertProtocolInStack()


Examples of org.jgroups.stack.ProtocolStack.insertProtocolInStack()

    public void testOrderWithScopedMulticasts() throws Exception {
        ProtocolStack stack=c2.getProtocolStack();
        Protocol neighbor=stack.findProtocol(UNICAST.class, UNICAST2.class);
        SCOPE scope=new SCOPE();
        stack.insertProtocolInStack(scope, neighbor, ProtocolStack.ABOVE);
        scope.init();

        c1.connect("SCOPE_Test");
        c2.connect("SCOPE_Test");
        assert c2.getView().size() == 2 : "c2.view is " + c2.getView();
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.insertProtocolInStack()

    private void sendMessages(Address dest, boolean use_scopes) throws Exception {
        if(use_scopes) {
            ProtocolStack stack=c2.getProtocolStack();
            Protocol neighbor=stack.findProtocol(UNICAST.class, UNICAST2.class);
            SCOPE scope=new SCOPE();
            stack.insertProtocolInStack(scope, neighbor, ProtocolStack.ABOVE);
            scope.init();
        }

        c1.connect("SCOPE_Test");
        c2.connect("SCOPE_Test");
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.insertProtocolInStack()

        // the first channel will discard the unicast messages with seqno #3 two times, the let them pass down
        ProtocolStack stack=c1.getProtocolStack();
        Protocol neighbor=stack.findProtocol(UNICAST.class, UNICAST2.class);
        System.out.println("Found unicast protocol " + neighbor.getClass().getSimpleName());
        stack.insertProtocolInStack(prot1, neighbor, ProtocolStack.BELOW);

        c1.connect("UNICAST_OOB_Test");
        c2.connect("UNICAST_OOB_Test");
        assert c2.getView().size() == 2 : "ch2.view is " + c2.getView();
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.insertProtocolInStack()

    public void testOrderWithScopedMulticasts() throws Exception {
        ProtocolStack stack=b.getProtocolStack();
        Protocol neighbor=stack.findProtocol(Util.getUnicastProtocols());
        SCOPE scope=new SCOPE();
        stack.insertProtocolInStack(scope, neighbor, ProtocolStack.ABOVE);
        scope.init();

        a.connect("SCOPE_Test");
        b.connect("SCOPE_Test");
        Util.waitUntilAllChannelsHaveSameSize(10000, 1000, a,b);
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.insertProtocolInStack()

    protected void sendMessages(Address dest, boolean use_scopes) throws Exception {
        if(use_scopes) {
            ProtocolStack stack=b.getProtocolStack();
            Protocol neighbor=stack.findProtocol(Util.getUnicastProtocols());
            SCOPE scope=new SCOPE();
            stack.insertProtocolInStack(scope, neighbor, ProtocolStack.ABOVE);
            scope.init();
        }

        a.connect("SCOPE_Test");
        b.connect("SCOPE_Test");
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.insertProtocolInStack()

        // the first channel will discard the unicast messages with seqno #3 two times, the let them pass down
        ProtocolStack stack=a.getProtocolStack();
        Protocol neighbor=stack.findProtocol(Util.getUnicastProtocols());
        System.out.println("Found unicast protocol " + neighbor.getClass().getSimpleName());
        stack.insertProtocolInStack(discard,neighbor,ProtocolStack.BELOW);

        a.connect("UNICAST_OOB_Test");
        b.connect("UNICAST_OOB_Test");
        Util.waitUntilAllChannelsHaveSameSize(10000, 1000, a,b);
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.insertProtocolInStack()

    }

    protected static void insertDiscardProtocol(JChannel ... channels) {
        for(JChannel ch: channels) {
            ProtocolStack stack=ch.getProtocolStack();
            stack.insertProtocolInStack(new DiscardEveryOtherMulticastMessage(), stack.getTransport(), ProtocolStack.ABOVE);
        }
    }

    protected static void removeDiscardProtocol(JChannel ... channels) {
        for(JChannel ch: channels)
View Full Code Here

Examples of org.jgroups.stack.ProtocolStack.insertProtocolInStack()

        }
    }

    protected static void insertDiscardProtocol(JChannel ch) {
        ProtocolStack stack=ch.getProtocolStack();
        stack.insertProtocolInStack(new DiscardEveryOtherUnicastMessage(), stack.getTransport(), ProtocolStack.ABOVE);
    }

    protected static void removeDiscardProtocol(JChannel ch) {
        ch.getProtocolStack().removeProtocol(DiscardEveryOtherUnicastMessage.class);
    }
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.