Skip to content

Commit

Permalink
ns
Browse files Browse the repository at this point in the history
  • Loading branch information
belaban committed Mar 6, 2009
1 parent c578166 commit 078f565
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 27 deletions.
15 changes: 5 additions & 10 deletions src/org/jgroups/blocks/AbstractConnectionMap.java
@@ -1,22 +1,17 @@
package org.jgroups.blocks;

import java.io.IOException;
import java.util.Collection;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import java.util.Vector;
import java.util.Map.Entry;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.jgroups.Address;
import org.jgroups.Global;
import org.jgroups.util.ThreadFactory;
import org.jgroups.util.Util;

import java.util.*;
import java.util.Map.Entry;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;

public abstract class AbstractConnectionMap<V extends Connection> implements ConnectionMap<V> {

protected final Vector<ConnectionMapListener<V>> conn_listeners=new Vector<ConnectionMapListener<V>>();
Expand Down
19 changes: 2 additions & 17 deletions src/org/jgroups/protocols/TCPPING.java
Expand Up @@ -33,7 +33,7 @@
* membership.
*
* @author Bela Ban
* @version $Id: TCPPING.java,v 1.41.4.2 2009/03/06 12:53:43 belaban Exp $
* @version $Id: TCPPING.java,v 1.41.4.3 2009/03/06 13:18:27 belaban Exp $
*/
public class TCPPING extends Discovery {

Expand Down Expand Up @@ -92,25 +92,10 @@ public void start() throws Exception {
}

public void sendGetMembersRequest(String cluster_name) {
Set<PhysicalAddress> target_addrs=new HashSet<PhysicalAddress>();

if(initial_hosts != null)
target_addrs.addAll(initial_hosts);

// Now add the current membership as well: if we only had A and B listed (initial_hosts="A[7800],B[7800]),
// but the actual membership is {A,B,C,D,E}, we'd never get UUID/PhysicalAddress mappings for C, D and E !
// synchronized(members) {
// for(Address mbr: members) {
//
// }
// }



PhysicalAddress physical_addr=(PhysicalAddress)down_prot.down(new Event(Event.GET_PHYSICAL_ADDRESS, local_addr));
PingData data=new PingData(local_addr, null, false, UUID.get(local_addr), Arrays.asList(physical_addr));
PingHeader hdr=new PingHeader(PingHeader.GET_MBRS_REQ, data, cluster_name);
for(final Address addr: target_addrs) {
for(final Address addr: initial_hosts) {
if(addr.equals(physical_addr))
continue;
final Message msg = new Message(addr, null, null);
Expand Down

0 comments on commit 078f565

Please sign in to comment.