Package org.jgroups.protocols

Examples of org.jgroups.protocols.PING


        v=new View(a1, 1, members);
        s=new Simulator();
        s.setLocalAddress(a1);
        s.setView(v);
        s.addMember(a1);
        bottom_prot=new PING();
        VIEW_SYNC view_sync=new VIEW_SYNC();
        Protocol[] stack=new Protocol[]{view_sync, barrier_prot, bottom_prot};
        s.setProtocolStack(stack);
        s.start();
    }
View Full Code Here


    JChannel channel = new JChannel(false);
    ProtocolStack stack = new ProtocolStack();
    channel.setProtocolStack(stack);
   
    stack.addProtocols(new UDP().setValue("bind_addr", InetAddress.getByName(BIND_ADDR)))
        .addProtocol(new PING())
        .addProtocol(new MERGE2())
        .addProtocol(new FD_SOCK())
        .addProtocol(new FD_ALL().setValue("timeout", 12000).setValue("interval", 3000))
        .addProtocol(new VERIFY_SUSPECT()).addProtocol(new BARRIER())
        .addProtocol(new NAKACK()).addProtocol(new UNICAST2())
View Full Code Here

    JChannel channel = new JChannel(false);
    ProtocolStack stack = new ProtocolStack();
    channel.setProtocolStack(stack);
   
    stack.addProtocols(new UDP().setValue("bind_addr", InetAddress.getByName("192.168.1.108")))
        .addProtocol(new PING())
        .addProtocol(new MERGE2())
        .addProtocol(new FD_SOCK())
        .addProtocol(new FD_ALL().setValue("timeout", 12000).setValue("interval", 3000))
        .addProtocol(new VERIFY_SUSPECT()).addProtocol(new BARRIER())
        .addProtocol(new NAKACK()).addProtocol(new UNICAST2())
View Full Code Here

            tunnel.setReconnectInterval(2000);
        }
    }

    private static void setRefreshInterval(JChannel channel) {
        PING ping=(PING)channel.getProtocolStack().findProtocol(PING.class);
        if(ping != null) {
            ping.setGossipRefresh(1000);
        }
    }
View Full Code Here

        v=new View(a1, 1, members);
        s=new Simulator();
        s.setLocalAddress(a1);
        s.setView(v);
        s.addMember(a1);
        bottom_prot=new PING();
        Protocol[] stack=new Protocol[]{new VIEW_SYNC(), barrier_prot, bottom_prot};
        s.setProtocolStack(stack);
        s.start();
    }
View Full Code Here

        TUNNEL tunnel=(TUNNEL)stack.getTransport();
        if(tunnel != null) {
            tunnel.setReconnectInterval(2000);
        }

        PING ping=(PING)stack.findProtocol(PING.class);
        if(ping != null) {
            ping.setGossipRefresh(1000);
        }
    }
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

TOP

Related Classes of org.jgroups.protocols.PING

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.