Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Alexander Kuppe2014-01-21 17:23:48 +0000
committerMarkus Alexander Kuppe2014-01-21 17:31:45 +0000
commit4686f64589b126b6eba1fab9e03931216e11535c (patch)
treec161a904410be3823f144aaee88e8bf69d771489 /compendium
parent1cc6d5ee527154557a70fd5c918c113e34db3495 (diff)
downloadorg.eclipse.ecf-4686f64589b126b6eba1fab9e03931216e11535c.tar.gz
org.eclipse.ecf-4686f64589b126b6eba1fab9e03931216e11535c.tar.xz
org.eclipse.ecf-4686f64589b126b6eba1fab9e03931216e11535c.zip
Bug 425761: BasicTopologyManagerImpl does not notify EndpointListeners
https://bugs.eclipse.org/bugs/show_bug.cgi?id=425761 - Remove cache in BTMI \o/ - Handle concurrency in AbstractTopologyManager Change-Id: Id5331ab49fbd0f4e274717aad3bc213fad18f851
Diffstat (limited to 'compendium')
-rw-r--r--compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/BasicTopologyManagerImpl.java29
1 files changed, 9 insertions, 20 deletions
diff --git a/compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/BasicTopologyManagerImpl.java b/compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/BasicTopologyManagerImpl.java
index ebc07ba74..6109a4dd7 100644
--- a/compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/BasicTopologyManagerImpl.java
+++ b/compendium/bundles/org.eclipse.ecf.osgi.services.distribution/src/org/eclipse/ecf/internal/osgi/services/distribution/BasicTopologyManagerImpl.java
@@ -1,8 +1,6 @@
package org.eclipse.ecf.internal.osgi.services.distribution;
import java.util.Map;
-import java.util.concurrent.ConcurrentHashMap;
-import java.util.concurrent.ConcurrentMap;
import org.eclipse.ecf.osgi.services.remoteserviceadmin.AbstractTopologyManager;
import org.eclipse.ecf.osgi.services.remoteserviceadmin.EndpointDescription;
import org.eclipse.ecf.osgi.services.remoteserviceadmin.RemoteConstants;
@@ -101,8 +99,6 @@ public class BasicTopologyManagerImpl extends AbstractTopologyManager implements
}
}
- private final ConcurrentMap<org.osgi.service.remoteserviceadmin.EndpointDescription, org.osgi.service.remoteserviceadmin.EndpointDescription> known = new ConcurrentHashMap<org.osgi.service.remoteserviceadmin.EndpointDescription, org.osgi.service.remoteserviceadmin.EndpointDescription>();
-
// EndpointListener impl
/*
* (non-Javadoc)
@@ -122,18 +118,16 @@ public class BasicTopologyManagerImpl extends AbstractTopologyManager implements
public void endpointAdded(
org.osgi.service.remoteserviceadmin.EndpointDescription endpoint,
String matchedFilter) {
- if (known.putIfAbsent(endpoint, endpoint) == null) {
- if (matchedFilter.equals(endpointListenerScope))
- if (endpoint instanceof EndpointDescription)
- handleECFEndpointAdded((EndpointDescription) endpoint);
- else
- handleNonECFEndpointAdded(this, endpoint);
+ if (matchedFilter.equals(endpointListenerScope))
+ if (endpoint instanceof EndpointDescription)
+ handleECFEndpointAdded((EndpointDescription) endpoint);
+ else
+ handleNonECFEndpointAdded(this, endpoint);
else if (matchedFilter.equals(NO_ECF_SCOPE))
- if (endpoint instanceof EndpointDescription)
- handleECFEndpointAdded((EndpointDescription) endpoint);
- else
- advertiseEndpointDescription(endpoint);
- }
+ if (endpoint instanceof EndpointDescription)
+ handleECFEndpointAdded((EndpointDescription) endpoint);
+ else
+ advertiseEndpointDescription(endpoint);
}
/*
@@ -147,11 +141,6 @@ public class BasicTopologyManagerImpl extends AbstractTopologyManager implements
public void endpointRemoved(
org.osgi.service.remoteserviceadmin.EndpointDescription endpoint,
String matchedFilter) {
- if (known.remove(endpoint) == null) {
- // Just remove the endpoint but don't block subsequent removals
- logWarning(
- "endpointRemoved", "EndpointDescription=" + endpoint + " redundant removal"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
- }
if (matchedFilter.equals(endpointListenerScope))
if (endpoint instanceof EndpointDescription)
handleECFEndpointRemoved((EndpointDescription) endpoint);

Back to the top