Package org.jgroups.protocols

Examples of org.jgroups.protocols.PingData


                            List<PingData> mbrs=new ArrayList<PingData>();
                            ConcurrentMap<Address,ConnectionHandler> map=routingTable.get(group);
                            if(map != null) {
                                for(Address logical_addr: map.keySet()) {
                                    physical_addrs=address_mappings.get(logical_addr);
                                    PingData rsp=new PingData(logical_addr, null, true, UUID.get(logical_addr),
                                                              physical_addrs != null? new ArrayList<PhysicalAddress>(physical_addrs) : null);
                                    mbrs.add(rsp);
                                }
                            }
                            output.writeShort(mbrs.size());
View Full Code Here


                            List<PingData> mbrs=new ArrayList<PingData>();
                            ConcurrentMap<Address,ConnectionHandler> map=routingTable.get(group);
                            if(map != null) {
                                for(Address logical_addr: map.keySet()) {
                                    PhysicalAddress physical_addr=address_mappings.get(logical_addr);
                                    PingData rsp=new PingData(logical_addr, true, UUID.get(logical_addr), physical_addr);
                                    mbrs.add(rsp);
                                }
                            }
                            output.writeShort(mbrs.size());
                            for(PingData data: mbrs)
View Full Code Here

            request.writeTo(output);
            output.flush();

            short num_rsps=input.readShort();
            for(int i=0; i < num_rsps; i++) {
                PingData rsp=new PingData();
                rsp.readFrom(input);
                rsps.addResponse(rsp, false);
            }
        }
        catch(Exception e) {          
            connectionStateChanged(ConnectionStatus.CONNECTION_BROKEN);
View Full Code Here

            if(ind == -1) { // new addition
                add(rsp);
                changed=true;
            }
            else {
                PingData existing=ping_rsps[ind]; // cannot be null
                if(overwrite || (is_coord_rsp && !existing.isCoord())) {
                    ping_rsps[ind]=rsp;
                    changed=true;
                }
            }
            if(changed && ((num_expected_rsps > 0 && index >= num_expected_rsps) || break_on_coord_rsp && is_coord_rsp))
View Full Code Here

    protected int[] numResponses() {
        lock.lock();
        try {
            int[] num={0,0};
            for(int i=0; i < index; i++) {
                PingData data=ping_rsps[i];
                num[0]++;
                if(data.isCoord())
                    num[1]++;
            }
            return num;
        }
        finally {
View Full Code Here

            request.writeTo(output);
            output.flush();

            short num_rsps=input.readShort();
            for(int i=0; i < num_rsps; i++) {
                PingData rsp=new PingData();
                rsp.readFrom(input);
                retval.add(rsp);
            }
        }      
        catch(Exception e) {          
            connectionStateChanged(ConnectionStatus.CONNECTION_BROKEN);
View Full Code Here

                            List<PingData> mbrs=new ArrayList<PingData>();
                            ConcurrentMap<Address,ConnectionHandler> map=routingTable.get(group);
                            if(map != null) {
                                for(Address logical_addr: map.keySet()) {
                                    physical_addrs=address_mappings.get(logical_addr);
                                    PingData rsp=new PingData(logical_addr, null, true, UUID.get(logical_addr),
                                                              physical_addrs != null? new ArrayList<PhysicalAddress>(physical_addrs) : null);
                                    mbrs.add(rsp);
                                }
                            }
                            output.writeShort(mbrs.size());
View Full Code Here

                            List<PingData> mbrs=new ArrayList<PingData>();
                            map=routingTable.get(group);
                            if(map != null) {
                                for(Address logical_addr: map.keySet()) {
                                    physical_addrs=address_mappings.get(logical_addr);
                                    PingData rsp=new PingData(logical_addr, null, true, UUID.get(logical_addr),
                                                              physical_addrs != null? new ArrayList<PhysicalAddress>(physical_addrs) : null);
                                    mbrs.add(rsp);
                                }
                            }
                            output.writeShort(mbrs.size());
View Full Code Here

            request.writeTo(output);
            output.flush();

            short num_rsps=input.readShort();
            for(int i=0; i < num_rsps; i++) {
                PingData rsp=new PingData();
                rsp.readFrom(input);
                retval.add(rsp);
            }
        }      
        catch(Exception e) {          
            connectionStateChanged(ConnectionStatus.CONNECTION_BROKEN);
View Full Code Here

            request.writeTo(output);
            output.flush();

            short num_rsps=input.readShort();
            for(int i=0; i < num_rsps; i++) {
                PingData rsp=new PingData();
                rsp.readFrom(input);
                retval.add(rsp);
            }
        }
        catch(SocketException se) {
            if(log.isWarnEnabled())
View Full Code Here

TOP

Related Classes of org.jgroups.protocols.PingData

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.