Updated Branches:
  refs/heads/master a6f2fb30a -> d69833e8d

Commenting terminate all rule until adding rules file


Project: http://git-wip-us.apache.org/repos/asf/incubator-stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-stratos/commit/e5fbb232
Tree: http://git-wip-us.apache.org/repos/asf/incubator-stratos/tree/e5fbb232
Diff: http://git-wip-us.apache.org/repos/asf/incubator-stratos/diff/e5fbb232

Branch: refs/heads/master
Commit: e5fbb232d678f45eb3b370f948ab5632eda56769
Parents: 73326f9
Author: Lahiru Sandaruwan <[email protected]>
Authored: Wed Jan 8 12:26:33 2014 +0530
Committer: Lahiru Sandaruwan <[email protected]>
Committed: Wed Jan 8 12:26:33 2014 +0530

----------------------------------------------------------------------
 .../rule/AutoscalerRuleEvaluator.java           | 52 ++++++++++----------
 1 file changed, 26 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/e5fbb232/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/AutoscalerRuleEvaluator.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/AutoscalerRuleEvaluator.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/AutoscalerRuleEvaluator.java
index 21ab342..57e266d 100644
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/AutoscalerRuleEvaluator.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/rule/AutoscalerRuleEvaluator.java
@@ -64,11 +64,11 @@ public class AutoscalerRuleEvaluator {
         if (log.isDebugEnabled()) {
             log.debug("Scale check rule is parsed successfully");
         }
-        terminateAllKbase = readKnowledgeBase(TERMINATE_ALL_DRL_FILE_NAME);
-
-        if (log.isDebugEnabled()) {
-            log.debug("Terminate all rule is parsed successfully");
-        }
+//        terminateAllKbase = readKnowledgeBase(TERMINATE_ALL_DRL_FILE_NAME);
+//
+//        if (log.isDebugEnabled()) {
+//            log.debug("Terminate all rule is parsed successfully");
+//        }
     }
 
     
@@ -108,21 +108,21 @@ public class AutoscalerRuleEvaluator {
 
 
 
-    public static FactHandle evaluateTerminateAll(StatefulKnowledgeSession 
ksession, FactHandle handle, Object obj) {
-
-        if (handle == null) {
-
-            ksession.setGlobal("$delegator", new RuleTasksDelegator());
-            handle = ksession.insert(obj);
-        } else {
-            ksession.update(handle, obj);
-        }
-        ksession.fireAllRules();
-        if(log.isDebugEnabled()){
-            log.debug(String.format("Terminate all check executed for : %s ", 
obj));
-        }
-        return handle;
-    }
+//    public static FactHandle evaluateTerminateAll(StatefulKnowledgeSession 
ksession, FactHandle handle, Object obj) {
+//
+//        if (handle == null) {
+//
+//            ksession.setGlobal("$delegator", new RuleTasksDelegator());
+//            handle = ksession.insert(obj);
+//        } else {
+//            ksession.update(handle, obj);
+//        }
+//        ksession.fireAllRules();
+//        if(log.isDebugEnabled()){
+//            log.debug(String.format("Terminate all check executed for : %s 
", obj));
+//        }
+//        return handle;
+//    }
 
 
 
@@ -138,12 +138,12 @@ public class AutoscalerRuleEvaluator {
         ksession.setGlobal("log", RuleLog.getInstance());
         return ksession;
     }
-    public StatefulKnowledgeSession getTerminateAllStatefulSession() {
-        StatefulKnowledgeSession ksession;
-        ksession = scaleCheckKbase.newStatefulKnowledgeSession();
-        ksession.setGlobal("log", RuleLog.getInstance());
-        return ksession;
-    }
+//    public StatefulKnowledgeSession getTerminateAllStatefulSession() {
+//        StatefulKnowledgeSession ksession;
+//        ksession = scaleCheckKbase.newStatefulKnowledgeSession();
+//        ksession.setGlobal("log", RuleLog.getInstance());
+//        return ksession;
+//    }
 
     public static String getLbClusterId(PartitionContext partitionContext, 
NetworkPartitionContext ctxt) {
         Properties props = partitionContext.getProperties();

Reply via email to