diff options
Diffstat (limited to 'sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org')
-rw-r--r-- | sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java b/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java index 3ceb3cd10e..bd979aa4a3 100644 --- a/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java +++ b/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java @@ -660,4 +660,21 @@ public class HazelcastDomainRegistry extends BaseDomainRegistry implements Domai return members; } + @Override + public String getLocalMember() { + return hazelcastInstance.getCluster().getLocalMember().getInetSocketAddress().toString(); + } + + @Override + public String getRunningMember(String contributionURI, String compositeURI) { + for (String m : runningCompositeOwners.keySet()) { + Map<String, List<String>> rcs = runningCompositeOwners.get(m); + for (String curi : rcs.keySet()) { + if (rcs.get(curi).contains(compositeURI)) { + return m; + } + } + } + return null; + } } |