summaryrefslogtreecommitdiffstats
path: root/sca-java-2.x/trunk/modules
diff options
context:
space:
mode:
authorantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-06-07 13:20:43 +0000
committerantelder <antelder@13f79535-47bb-0310-9956-ffa450edef68>2011-06-07 13:20:43 +0000
commit835a1f814cc883179ca76fc3071a21e14c339d0f (patch)
tree7df35abebe36474eccd2f0e36af065f0574b4b15 /sca-java-2.x/trunk/modules
parented75826096c181c1e217f1d197a9c1acf0093a00 (diff)
Rename 'member' to 'node' as it seems too confusing to try to have a different name for it
git-svn-id: http://svn.us.apache.org/repos/asf/tuscany@1132994 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'sca-java-2.x/trunk/modules')
-rw-r--r--sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java6
-rw-r--r--sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java6
-rw-r--r--sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java6
-rw-r--r--sca-java-2.x/trunk/modules/domain-hazelcast/src/main/java/org/apache/tuscany/sca/registry/hazelcast/HazelcastDomainRegistry.java6
-rw-r--r--sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java6
-rw-r--r--sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java14
-rw-r--r--sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedDomainRegistry.java6
-rw-r--r--sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java36
8 files changed, 43 insertions, 43 deletions
diff --git a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java
index 6f1dfec63a..7d775f203a 100644
--- a/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java
+++ b/sca-java-2.x/trunk/modules/core-spi/src/main/java/org/apache/tuscany/sca/runtime/DomainRegistry.java
@@ -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();
diff --git a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
index b4f2b99f98..c8383d3065 100644
--- a/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
+++ b/sca-java-2.x/trunk/modules/core/src/main/java/org/apache/tuscany/sca/core/assembly/impl/DomainRegistryImpl.java
@@ -231,17 +231,17 @@ public class DomainRegistryImpl extends BaseDomainRegistry implements DomainRegi
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;
}
diff --git a/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java b/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java
index ee5dd41ffe..920177e597 100644
--- a/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java
+++ b/sca-java-2.x/trunk/modules/deployment/src/main/java/org/apache/tuscany/sca/deployment/impl/DeployerImpl.java
@@ -902,19 +902,19 @@ public class DeployerImpl implements Deployer {
}
@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;
}
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 4bf120a641..5dd1d30515 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
@@ -672,7 +672,7 @@ public class HazelcastDomainRegistry extends BaseDomainRegistry implements Domai
}
@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 extends BaseDomainRegistry implements Domai
}
@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) {
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java
index 37eeb4cae4..ad6908723a 100644
--- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java
+++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/Node.java
@@ -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
diff --git a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
index 1b4f0a103f..f611a8bdd3 100644
--- a/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
+++ b/sca-java-2.x/trunk/modules/domain-node/src/main/java/org/apache/tuscany/sca/impl/NodeImpl.java
@@ -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);
}
}
diff --git a/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedDomainRegistry.java b/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedDomainRegistry.java
index 89ab4a61c0..e101f916dd 100644
--- a/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedDomainRegistry.java
+++ b/sca-java-2.x/trunk/modules/endpoint-tribes/src/main/java/org/apache/tuscany/sca/endpoint/tribes/ReplicatedDomainRegistry.java
@@ -477,19 +477,19 @@ public class ReplicatedDomainRegistry extends BaseDomainRegistry implements Doma
}
@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;
}
diff --git a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
index 4345f3732e..2d91e64d49 100644
--- a/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
+++ b/sca-java-2.x/trunk/modules/shell/src/main/java/org/apache/tuscany/sca/shell/Shell.java
@@ -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>");