tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From antel...@apache.org
Subject svn commit: r1132994 - in /tuscany/sca-java-2.x/trunk/modules: core-spi/src/main/java/org/apache/tuscany/sca/runtime/ core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/ deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/ domain-...
Date Tue, 07 Jun 2011 13:20:44 GMT
Author: antelder
Date: Tue Jun  7 13:20:43 2011
New Revision: 1132994

URL: http://svn.apache.org/viewvc?rev=1132994&view=rev
Log:
Rename 'member' to 'node' as it seems too confusing to try to have a different name for it

Modified:
    tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java
    tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
    tuscany/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java
    tuscany/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java
    tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java
    tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
    tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedDomainRegistry.java
    tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java

Modified: tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java?rev=1132994&r1=1132993&r2=1132994&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java
Tue Jun  7 13:20:43 2011
@@ -96,9 +96,9 @@ public interface DomainRegistry {
 
     String getContainingCompositesContributionURI(String componentName);
     
-    List<String> getMembers();
-    String getLocalMember();
-    String getRunningMember(String contributionURI, String compositeURI);
+    List<String> getNodeNames();
+    String getLocalNodeName();
+    String getRunningNodeName(String contributionURI, String compositeURI);
     
     String remoteCommand(String memberName, Callable<String> command);
     public Composite getDomainComposite();

Modified: tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java?rev=1132994&r1=1132993&r2=1132994&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
Tue Jun  7 13:20:43 2011
@@ -231,17 +231,17 @@ public class DomainRegistryImpl extends 
 
     private static final String LOCAL_MEMBER_NAME = "LocalOnly";
     @Override
-    public List<String> getMembers() {
+    public List<String> getNodeNames() {
         return Arrays.asList(new String[]{LOCAL_MEMBER_NAME});
     }
 
     @Override
-    public String getLocalMember() {
+    public String getLocalNodeName() {
         return LOCAL_MEMBER_NAME;
     }
 
     @Override
-    public String getRunningMember(String contributionURI, String compositeURI) {
+    public String getRunningNodeName(String contributionURI, String compositeURI) {
         if (getRunningComposite(contributionURI, compositeURI) != null) {
             return LOCAL_MEMBER_NAME;
         }

Modified: tuscany/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java?rev=1132994&r1=1132993&r2=1132994&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java
Tue Jun  7 13:20:43 2011
@@ -902,19 +902,19 @@ public class DeployerImpl implements Dep
         }
 
         @Override
-        public List<String> getMembers() {
+        public List<String> getNodeNames() {
             // TODO Auto-generated method stub
             return null;
         }
 
         @Override
-        public String getLocalMember() {
+        public String getLocalNodeName() {
             // TODO Auto-generated method stub
             return null;
         }
 
         @Override
-        public String getRunningMember(String contributionURI, String compositeURI) {
+        public String getRunningNodeName(String contributionURI, String compositeURI) {
             // TODO Auto-generated method stub
             return null;
         }

Modified: tuscany/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java?rev=1132994&r1=1132993&r2=1132994&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java
Tue Jun  7 13:20:43 2011
@@ -672,7 +672,7 @@ public class HazelcastDomainRegistry ext
     }
 
     @Override
-    public List<String> getMembers() {
+    public List<String> getNodeNames() {
         List<String> members = new ArrayList<String>();
         for (Member m : hazelcastInstance.getCluster().getMembers()) {
             if (!m.isSuperClient()) {
@@ -683,12 +683,12 @@ public class HazelcastDomainRegistry ext
     }
 
     @Override
-    public String getLocalMember() {
+    public String getLocalNodeName() {
         return hazelcastInstance.getCluster().getLocalMember().getInetSocketAddress().toString();
     }
 
     @Override
-    public String getRunningMember(String contributionURI, String compositeURI) {
+    public String getRunningNodeName(String contributionURI, String compositeURI) {
         for (String m : runningCompositeOwners.keySet()) {
             Map<String, List<String>> rcs = runningCompositeOwners.get(m);
             if (rcs != null) {

Modified: tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java?rev=1132994&r1=1132993&r2=1132994&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java
Tue Jun  7 13:20:43 2011
@@ -244,9 +244,9 @@ public interface Node {
     void validateContribution(String string) throws ContributionReadException, ValidationException;
 
     // TODO: should these member getters be replaced with a getDomainRegistry?
-    List<String> getMembers();
-    String getLocalMember();
-    String getRunningMember(String contributionURI, String compositeURI);
+    List<String> getNodeNames();
+    String getLocalNodeName();
+    String getRunningNodeName(String contributionURI, String compositeURI);
 
     // TODO: Add methods to get:
     //   get/display contribution content

Modified: tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java?rev=1132994&r1=1132993&r2=1132994&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
Tue Jun  7 13:20:43 2011
@@ -265,7 +265,7 @@ public class NodeImpl implements Node {
             dc.stop();
             stoppedComposites.put(key, dc);
         } else {
-            String member = domainRegistry.getRunningMember(contributionURI, compositeURI);
+            String member = domainRegistry.getRunningNodeName(contributionURI, compositeURI);
             if (member == null) {
                 throw new IllegalStateException("composite not started: " + compositeURI);
             }
@@ -401,18 +401,18 @@ public class NodeImpl implements Node {
     }
 
     @Override
-    public List<String> getMembers() {
-        return domainRegistry.getMembers();
+    public List<String> getNodeNames() {
+        return domainRegistry.getNodeNames();
     }
 
     @Override
-    public String getLocalMember() {
-        return domainRegistry.getLocalMember();
+    public String getLocalNodeName() {
+        return domainRegistry.getLocalNodeName();
     }
 
     @Override
-    public String getRunningMember(String contributionURI, String compositeURI) {
-        return domainRegistry.getRunningMember(contributionURI, compositeURI);
+    public String getRunningNodeName(String contributionURI, String compositeURI) {
+        return domainRegistry.getRunningNodeName(contributionURI, compositeURI);
     }
 
 }

Modified: tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedDomainRegistry.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedDomainRegistry.java?rev=1132994&r1=1132993&r2=1132994&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedDomainRegistry.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedDomainRegistry.java
Tue Jun  7 13:20:43 2011
@@ -477,19 +477,19 @@ public class ReplicatedDomainRegistry ex
     }
 
     @Override
-    public List<String> getMembers() {
+    public List<String> getNodeNames() {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
-    public String getLocalMember() {
+    public String getLocalNodeName() {
         // TODO Auto-generated method stub
         return null;
     }
 
     @Override
-    public String getRunningMember(String contributionURI, String compositeURI) {
+    public String getRunningNodeName(String contributionURI, String compositeURI) {
         // TODO Auto-generated method stub
         return null;
     }

Modified: tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
URL: http://svn.apache.org/viewvc/tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java?rev=1132994&r1=1132993&r2=1132994&view=diff
==============================================================================
--- tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
(original)
+++ tuscany/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
Tue Jun  7 13:20:43 2011
@@ -73,7 +73,7 @@ public class Shell {
     private Map<String, Node> nodes = new HashMap<String, Node>();
 
     public static final String[] COMMANDS = new String[] {"addComposite", "bye", "domain",
"domains", "domainComposite", "help", "install", "installed", "invoke",
-                                                          "load", "members", "remove", "run",
"save", "services", "start", "started", "stop"};
+                                                          "load", "nodes", "remove", "run",
"save", "services", "start", "started", "stop"};
 
     public static void main(final String[] args) throws Exception {
         boolean useJline = true;
@@ -451,8 +451,8 @@ public class Shell {
         return true;
     }
 
-    boolean remoteStart(String contributionURI, String compositeURI, String member) throws
ActivationException {
-        getNode().startComposite(member, contributionURI, compositeURI);
+    boolean remoteStart(String contributionURI, String compositeURI, String nodeName) throws
ActivationException {
+        getNode().startComposite(nodeName, contributionURI, compositeURI);
         return true;
     }
 
@@ -487,17 +487,17 @@ public class Shell {
                 for (String curi : node.getStartedCompositeURIs().keySet()) {
                     for (String compositeURI : node.getStartedCompositeURIs().get(curi))
{
                         
-                        String runningMember = node.getRunningMember(curi, compositeURI);
-                        if (node.getLocalMember().equals(runningMember)) {
-                            runningMember = "this";
+                        String runningNodeName = node.getRunningNodeName(curi, compositeURI);
+                        if (node.getLocalNodeName().equals(runningNodeName)) {
+                            runningNodeName = "this";
                         }
-                        if ("LocalOnly".equals(runningMember)) {
-                            runningMember = ""; 
+                        if ("LocalOnly".equals(runningNodeName)) {
+                            runningNodeName = ""; 
                         } else {
-                            runningMember = " (" + runningMember + ")"; 
+                            runningNodeName = " (" + runningNodeName + ")"; 
                         }
                         
-                        out.println("   " + curi + " " + compositeURI + runningMember);
+                        out.println("   " + curi + " " + compositeURI + runningNodeName);
                     }
                 }
 //                    }
@@ -507,10 +507,10 @@ public class Shell {
         return true;
     }
 
-    boolean members() {
-        String localMember = getNode().getLocalMember();
-        for (String member : getNode().getMembers()) {
-            out.println(member + (localMember.equals(member) ? " (this)" : ""));
+    boolean nodes() {
+        String localNode = getNode().getLocalNodeName();
+        for (String node : getNode().getNodeNames()) {
+            out.println(node + (localNode.equals(node) ? " (this)" : ""));
         }
         return true;
     }
@@ -632,10 +632,10 @@ public class Shell {
                     return load(toks.get(1));
                 }
             };
-        if (op.equalsIgnoreCase("members"))
+        if (op.equalsIgnoreCase("nodes"))
             return new Callable<Boolean>() {
                 public Boolean call() throws Exception {
-                    return members();
+                    return nodes();
                 }
             };
         if (op.equalsIgnoreCase("remove"))
@@ -814,12 +814,12 @@ public class Shell {
         out.println("   installed [<contributionURI>]");
         out.println("   invoke <component>[/<service>] <operation> [<arg0>
<arg1> ...]");
         out.println("   load <configXmlURL>");
-        out.println("   members");
+        out.println("   nodes");
         out.println("   remove <contributionURI>");
         out.println("   run <commandsFileURL>");
         out.println("   save <directoryPath>");
         out.println("   services");
-        out.println("   start <curi> <compositeUri> [<member>]");
+        out.println("   start <curi> <compositeUri> [<nodeName>]");
         out.println("   started");
         out.println("   status");
         out.println("   stop <curi> <compositeUri>");



Mime
View raw message