Examples of findProtocol()


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


    private static void modifyStack(JChannel ... channels) {
        for(JChannel ch: channels) {
            ProtocolStack stack=ch.getProtocolStack();
            STABLE stable=(STABLE)stack.findProtocol(STABLE.class);
            if(stable == null)
                throw new IllegalStateException("STABLE protocol was not found");
            stable.setDesiredAverageGossip(2000);
        }
    }
View Full Code Here

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

        sendMessages(c2.getAddress(), true);
    }

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

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


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

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

        System.out.println(" -- "+ msg);
    }

    private static void modifyStack(JChannel ch) {
        ProtocolStack stack=ch.getProtocolStack();
        GMS gms=(GMS)stack.findProtocol(GMS.class);
        if(gms != null)
            gms.setLogCollectMessages(false);
    }

View Full Code Here

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

        MyReceiver receiver=new MyReceiver();
        c2.setReceiver(receiver);

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

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

        }
    }

    private static void modifyStack(JChannel ch) {
        ProtocolStack stack=ch.getProtocolStack();
        Protocol prot=stack.findProtocol(MERGE2.class);
        if(prot != null) {
            MERGE2 merge=(MERGE2)prot;
            merge.setMinInterval(3000);
            merge.setMaxInterval(5000);
        }
View Full Code Here

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

        if(prot != null) {
            MERGE2 merge=(MERGE2)prot;
            merge.setMinInterval(3000);
            merge.setMaxInterval(5000);
        }
        prot=stack.findProtocol(STABLE.class);
        if(prot != null) {
            STABLE stable=(STABLE)prot;
            stable.setDesiredAverageGossip(5000);
        }
        prot=stack.findProtocol(NAKACK.class);
View Full Code Here

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

        prot=stack.findProtocol(STABLE.class);
        if(prot != null) {
            STABLE stable=(STABLE)prot;
            stable.setDesiredAverageGossip(5000);
        }
        prot=stack.findProtocol(NAKACK.class);
        if(prot != null) {
            ((NAKACK)prot).setLogDiscardMessages(false);
        }
        prot=stack.findProtocol(FD_SOCK.class);
        if(prot != null) {
View Full Code Here

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

        }
        prot=stack.findProtocol(NAKACK.class);
        if(prot != null) {
            ((NAKACK)prot).setLogDiscardMessages(false);
        }
        prot=stack.findProtocol(FD_SOCK.class);
        if(prot != null) {
            ((FD_SOCK)prot).setLogSuspectedMessages(false);
        }
    }
View Full Code Here

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

                                  long delay_join_req, long tolerance) throws Exception {
        c1.connect("JoinTest");
        c2.connect("JoinTest");

        ProtocolStack stack=c2.getProtocolStack();
        GMS gms=(GMS)stack.findProtocol("GMS");
        if(gms != null) {
            gms.setJoinTimeout(join_timeout);
        }

        Discovery discovery=(Discovery)stack.findProtocol(Discovery.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.