Author: clebert.suconic(a)jboss.com
Date: 2011-08-01 10:25:42 -0400 (Mon, 01 Aug 2011)
New Revision: 11088
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
Log:
tweak
Modified:
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java
===================================================================
---
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-08-01
14:25:18 UTC (rev 11087)
+++
branches/Branch_2_2_EAP_cluster_clean2/src/main/org/hornetq/core/client/impl/ServerLocatorImpl.java 2011-08-01
14:25:42 UTC (rev 11088)
@@ -1202,10 +1202,8 @@
closed = true;
}
- public synchronized void notifyNodeDown(final String nodeID)
+ public void notifyNodeDown(final String nodeID)
{
- boolean removed = false;
-
if (!clusterConnection && !ha)
{
if (log.isDebugEnabled())
@@ -1220,7 +1218,7 @@
log.debug("XXX ZZZ nodeDown " + this + " nodeID=" + nodeID +
" as being down", new Exception("trace"));
}
- removed = topology.removeMember(nodeID);
+ topology.removeMember(nodeID);
if (!topology.isEmpty())
{
@@ -1240,7 +1238,7 @@
}
- public synchronized void notifyNodeUp(final String nodeID,
+ public void notifyNodeUp(final String nodeID,
final Pair<TransportConfiguration,
TransportConfiguration> connectorPair,
final boolean last)
{
@@ -1280,13 +1278,16 @@
updateArraysAndPairs();
}
- if (last)
+ synchronized (this)
{
- receivedTopology = true;
+ if (last)
+ {
+ receivedTopology = true;
+ }
+
+ // Notify if waiting on getting topology
+ notifyAll();
}
-
- // Notify if waiting on getting topology
- notify();
}
/* (non-Javadoc)
@@ -1313,7 +1314,7 @@
}
}
- private void updateArraysAndPairs()
+ private synchronized void updateArraysAndPairs()
{
Collection<TopologyMember> membersCopy = topology.getMembers();
Show replies by date