You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by la...@apache.org on 2014/12/02 03:09:03 UTC
[1/2] stratos git commit: Merging VMServiceClusterContext to
VMClusterContext as abstraction is not required now
Repository: stratos
Updated Branches:
refs/heads/master 52ce24f4a -> 248e4d6b1
Merging VMServiceClusterContext to VMClusterContext as abstraction is not required now
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/466fe313
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/466fe313
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/466fe313
Branch: refs/heads/master
Commit: 466fe313ba1993571ae46df6282df8bdf8ac74b0
Parents: 52ce24f
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Tue Dec 2 07:40:09 2014 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Tue Dec 2 07:40:09 2014 +0530
----------------------------------------------------------------------
.../autoscaler/context/cluster/ClusterContextFactory.java | 4 ++--
.../event/receiver/topology/AutoscalerTopologyEventReceiver.java | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/466fe313/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
index 23d703e..02773e0 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/ClusterContextFactory.java
@@ -48,7 +48,7 @@ public class ClusterContextFactory {
private static final Log log = LogFactory.getLog(ClusterContextFactory.class);
- public static VMServiceClusterContext getVMServiceClusterContext(String instanceId, Cluster cluster)
+ public static VMClusterContext getVMClusterContext(String instanceId, Cluster cluster)
throws PolicyValidationException, PartitionValidationException {
if (null == cluster) {
@@ -74,7 +74,7 @@ public class ClusterContextFactory {
ApplicationHolder.releaseReadLock();
}
- return new VMServiceClusterContext(cluster.getClusterId(), cluster.getServiceName(), autoscalePolicy,
+ return new VMClusterContext(cluster.getClusterId(), cluster.getServiceName(), autoscalePolicy,
deploymentPolicy);
}
http://git-wip-us.apache.org/repos/asf/stratos/blob/466fe313/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
index 7f8af6f..9ed5b03 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/event/receiver/topology/AutoscalerTopologyEventReceiver.java
@@ -474,7 +474,7 @@ public class AutoscalerTopologyEventReceiver implements Runnable {
if (clusterContext == null) {
clusterMonitor.setClusterContext(
ClusterContextFactory.
- getVMServiceClusterContext(instanceId,
+ getVMClusterContext(instanceId,
cluster));
} else {
clusterContext.addInstanceContext(instanceId, cluster);
[2/2] stratos git commit: Removing VMServiceClusterContext
Posted by la...@apache.org.
Removing VMServiceClusterContext
Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/248e4d6b
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/248e4d6b
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/248e4d6b
Branch: refs/heads/master
Commit: 248e4d6b1b22fb8b2992333579aec5adf2d8ab25
Parents: 466fe31
Author: Lahiru Sandaruwan <la...@apache.org>
Authored: Tue Dec 2 07:40:30 2014 +0530
Committer: Lahiru Sandaruwan <la...@apache.org>
Committed: Tue Dec 2 07:40:30 2014 +0530
----------------------------------------------------------------------
.../cluster/VMServiceClusterContext.java | 56 --------------------
1 file changed, 56 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/stratos/blob/248e4d6b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/VMServiceClusterContext.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/VMServiceClusterContext.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/VMServiceClusterContext.java
deleted file mode 100644
index b865e85..0000000
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/context/cluster/VMServiceClusterContext.java
+++ /dev/null
@@ -1,56 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.stratos.autoscaler.context.cluster;
-
-import org.apache.commons.logging.Log;
-import org.apache.commons.logging.LogFactory;
-import org.apache.stratos.autoscaler.context.partition.network.ClusterLevelNetworkPartitionContext;
-import org.apache.stratos.autoscaler.pojo.policy.autoscale.AutoscalePolicy;
-import org.apache.stratos.autoscaler.pojo.policy.deployment.ChildPolicy;
-import org.apache.stratos.autoscaler.pojo.policy.deployment.DeploymentPolicy;
-
-import java.util.Map;
-
-/*
- * It holds the runtime data of a VM service cluster
- */
-public class VMServiceClusterContext extends VMClusterContext {
-
- private static final Log log = LogFactory.getLog(VMServiceClusterContext.class);
-
- protected AutoscalePolicy autoscalePolicy;
-
- public VMServiceClusterContext(String clusterId, String serviceId, AutoscalePolicy autoscalePolicy,
- DeploymentPolicy deploymentPolicy) {
-
- super(clusterId, serviceId, autoscalePolicy, deploymentPolicy);
- this.autoscalePolicy = autoscalePolicy;
-
- }
-
- public AutoscalePolicy getAutoscalePolicy() {
- return autoscalePolicy;
- }
-
- public void setAutoscalePolicy(AutoscalePolicy autoscalePolicy) {
- this.autoscalePolicy = autoscalePolicy;
- }
-
-
-}