Repository: stratos Updated Branches: refs/heads/4.0.0-grouping 317858007 -> 671165d80
merging AbstractMonitor Project: http://git-wip-us.apache.org/repos/asf/stratos/repo Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/671165d8 Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/671165d8 Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/671165d8 Branch: refs/heads/4.0.0-grouping Commit: 671165d805a2f05d8e3d856717340fd83d761d73 Parents: 3178580 Author: Isuru Haththotuwa <[email protected]> Authored: Thu Aug 28 17:31:48 2014 +0530 Committer: Isuru Haththotuwa <[email protected]> Committed: Thu Aug 28 17:31:48 2014 +0530 ---------------------------------------------------------------------- .../autoscaler/monitor/AbstractMonitor.java | 67 +++----------------- 1 file changed, 8 insertions(+), 59 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/stratos/blob/671165d8/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/AbstractMonitor.java ---------------------------------------------------------------------- diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/AbstractMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/AbstractMonitor.java index d19694a..3d5ab2f 100644 --- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/AbstractMonitor.java +++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/AbstractMonitor.java @@ -18,12 +18,11 @@ */ package org.apache.stratos.autoscaler.monitor; -<<<<<<< HEAD -======= +import org.apache.stratos.autoscaler.policy.model.AutoscalePolicy; + import java.util.Map; import org.apache.commons.configuration.XMLConfiguration; ->>>>>>> master import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.apache.stratos.autoscaler.NetworkPartitionContext; @@ -46,14 +45,13 @@ import java.util.Map; * and perform minimum instance check and scaling check using the underlying * rules engine. */ -<<<<<<< HEAD -abstract public class AbstractMonitor implements Runnable { + abstract public class AbstractMonitor implements Runnable{ - private static final Log log = LogFactory.getLog(AbstractMonitor.class); - // Map<NetworkpartitionId, Network Partition Context> - protected Map<String, NetworkPartitionContext> networkPartitionCtxts; - protected DeploymentPolicy deploymentPolicy; - protected AutoscalePolicy autoscalePolicy; + private static final Log log = LogFactory.getLog(AbstractMonitor.class); + // Map<NetworkpartitionId, Network Partition Context> + protected Map<String, NetworkPartitionContext> networkPartitionCtxts; + protected DeploymentPolicy deploymentPolicy; + protected AutoscalePolicy autoscalePolicy; protected FactHandle minCheckFactHandle; @@ -63,50 +61,6 @@ abstract public class AbstractMonitor implements Runnable { protected StatefulKnowledgeSession minCheckKnowledgeSession; protected StatefulKnowledgeSession scaleCheckKnowledgeSession; protected StatefulKnowledgeSession terminateDependencyKnowledgeSession; - protected boolean isDestroyed; - - protected String clusterId; - protected String serviceId; - - protected AutoscalerRuleEvaluator autoscalerRuleEvaluator; - - @Override - public void run() { - // TODO Auto-generated method stub - - } - - - public NetworkPartitionContext getNetworkPartitionCtxt(Member member) { - log.info("***** getNetworkPartitionCtxt " + member.getNetworkPartitionId()); - String networkPartitionId = member.getNetworkPartitionId(); - if (networkPartitionCtxts.containsKey(networkPartitionId)) { - log.info("returnnig network partition context " + networkPartitionCtxts.get(networkPartitionId)); - return networkPartitionCtxts.get(networkPartitionId); - } - log.info("returning null getNetworkPartitionCtxt"); - return null; - } - - public String getPartitionOfMember(String memberId) { - for (Service service : TopologyManager.getTopology().getServices()) { - for (Cluster cluster : service.getClusters()) { - if (cluster.memberExists(memberId)) { -======= - abstract public class AbstractMonitor implements Runnable{ - - private static final Log log = LogFactory.getLog(AbstractMonitor.class); - // Map<NetworkpartitionId, Network Partition Context> - protected Map<String, NetworkPartitionContext> networkPartitionCtxts; - protected DeploymentPolicy deploymentPolicy; - protected AutoscalePolicy autoscalePolicy; - - - protected FactHandle minCheckFactHandle; - protected FactHandle scaleCheckFactHandle; - - protected StatefulKnowledgeSession minCheckKnowledgeSession; - protected StatefulKnowledgeSession scaleCheckKnowledgeSession; protected boolean isDestroyed; protected String clusterId; @@ -152,7 +106,6 @@ abstract public class AbstractMonitor implements Runnable { for(Service service: TopologyManager.getTopology().getServices()){ for(Cluster cluster: service.getClusters()){ if(cluster.memberExists(memberId)){ ->>>>>>> master return cluster.getMember(memberId).getPartitionId(); } } @@ -250,7 +203,6 @@ abstract public class AbstractMonitor implements Runnable { this.minCheckFactHandle = minCheckFactHandle; } -<<<<<<< HEAD public StatefulKnowledgeSession getTerminateDependencyKnowledgeSession() { return terminateDependencyKnowledgeSession; } @@ -269,10 +221,7 @@ abstract public class AbstractMonitor implements Runnable { this.terminateDependencyFactHandle = terminateDependencyFactHandle; } - -======= public int getMonitorInterval() { return monitorInterval; } ->>>>>>> master } \ No newline at end of file
