Package org.jgroups.stack

Examples of org.jgroups.stack.GossipClient$Refresher



    public void start() throws Exception {
        super.start();
        if(gossip_client == null)
            gossip_client=new GossipClient(initial_hosts, gossip_refresh_rate);
    }
View Full Code Here


            log.error("Failed to start the router on port " + routerPort);
            gossipRouter=null;
            throw e;
        }

        GossipClient client=null;

        // verify the router - try for 10 secs to connect
        long startms=System.currentTimeMillis();
        Exception lastConnectException=null;
        long crtms=startms;

        while(crtms - startms < 10000) {
            try {
                client=new GossipClient(new IpAddress(bind_addr, routerPort), 10000);
                client.getMembers("Utilities:startGossipRouterConnectionTest");
                lastConnectException=null;
                break;
            }
            catch(Exception e) {
                if(client != null)
                    client.stop();
                lastConnectException=e;
                Thread.sleep(1000);
                crtms=System.currentTimeMillis();
            }
        }
View Full Code Here

    }

    public void setUp() throws Exception {
        super.setUp();
        port=Utilities.startGossipRouter(expiryTime, "127.0.0.1");
        client=new GossipClient(new IpAddress("127.0.0.1", port), expiryTime);
        client.setRefresherEnabled(false); // don't refresh the registrations
    }
View Full Code Here

            props.remove("gossip_refresh");
        }

        if(gossip_host != null && gossip_port != 0) {
            try {
                client=new GossipClient(new IpAddress(InetAddress.getByName(gossip_host), gossip_port), gossip_refresh);
            }
            catch(Exception e) {
                if(log.isErrorEnabled()) log.error("creation of GossipClient failed, exception=" + e);
                return false; // will cause stack creation to abort
            }
View Full Code Here

    }
   
    public void init() throws Exception {
        super.init();
        if(gossip_hosts != null) {
            client=new GossipClient(gossip_hosts, gossip_refresh, 1000, timer);
            client.setSocketConnectionTimeout(socket_conn_timeout);
            client.setSocketReadTimeout(socket_read_timeout);
        }
        else if(gossip_host != null && gossip_port != 0) {
            try {
                client=new GossipClient(new IpAddress(InetAddress.getByName(gossip_host),
                                                      gossip_port), gossip_refresh, socket_conn_timeout, timer);
                client.setSocketConnectionTimeout(socket_conn_timeout);
                client.setSocketReadTimeout(socket_read_timeout);
            }
            catch(Exception e) {
View Full Code Here

    }

    public void start() throws Exception {
        super.start();
        if(gossip_client == null) {
            gossip_client=new GossipClient(initial_hosts, gossip_refresh_rate, sock_conn_timeout, timer);
            gossip_client.setSocketReadTimeout(sock_read_timeout);
        }
    }
View Full Code Here


    public void start() throws Exception {
        super.start();
        if(gossip_client == null)
            gossip_client=new GossipClient(initial_hosts, gossip_refresh_rate, sock_conn_timeout);
    }
View Full Code Here

            gossip_refresh=Long.parseLong(str);
            props.remove("gossip_refresh");
        }

        if(gossip_hosts != null) {
            client=new GossipClient(gossip_hosts, gossip_refresh);
        }
        else if(gossip_host != null && gossip_port != 0) {
            try {
                client=new GossipClient(new IpAddress(InetAddress.getByName(gossip_host), gossip_port), gossip_refresh);
            }
            catch(Exception e) {
                if(log.isErrorEnabled()) log.error("creation of GossipClient failed, exception=" + e);
                return false; // will cause stack creation to abort
            }
View Full Code Here


    public void start() throws Exception {
        super.start();
        if(gossip_client == null) {
            gossip_client=new GossipClient(initial_hosts, gossip_refresh_rate, sock_conn_timeout);
            gossip_client.setSocketReadTimeout(sock_read_timeout);
        }
    }
View Full Code Here

    public void setUp() throws Exception {
        super.setUp();
        router=new GossipRouter();
        router.setExpiryTime(expiryTime);
        router.start();
        client=new GossipClient(new IpAddress("127.0.0.1", 12001), expiryTime);
        client.setRefresherEnabled(false); // don't refresh the registrations
    }
View Full Code Here

TOP

Related Classes of org.jgroups.stack.GossipClient$Refresher

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.