Updated Branches:
  refs/heads/master df1e7fd1a -> 9a6c7156a

Initialize health stat receiver in constructor


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

Branch: refs/heads/master
Commit: 9a6c7156ac82f9e7ee31a1f6c02a5ceac53d769a
Parents: df1e7fd
Author: Lahiru Sandaruwan <[email protected]>
Authored: Thu Jan 9 19:15:23 2014 +0530
Committer: Lahiru Sandaruwan <[email protected]>
Committed: Thu Jan 9 19:15:23 2014 +0530

----------------------------------------------------------------------
 .../receiver/health/AutoscalerHealthStatReceiver.java     | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/9a6c7156/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/AutoscalerHealthStatReceiver.java
----------------------------------------------------------------------
diff --git 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/AutoscalerHealthStatReceiver.java
 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/AutoscalerHealthStatReceiver.java
index 3954610..a3e1fa0 100644
--- 
a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/AutoscalerHealthStatReceiver.java
+++ 
b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/message/receiver/health/AutoscalerHealthStatReceiver.java
@@ -52,6 +52,10 @@ public class AutoscalerHealthStatReceiver implements 
Runnable {
     private boolean terminated = false;
 
     private HealthStatReceiver healthStatReceiver;
+
+    public AutoscalerHealthStatReceiver() {
+               this.healthStatReceiver = new 
HealthStatReceiver(createMessageDelegator());
+    }
 //    @Override
 //    public void run() {
 //        if(log.isInfoEnabled()) {
@@ -418,6 +422,8 @@ public class AutoscalerHealthStatReceiver implements 
Runnable {
 //
 
 
+
+
     @Override
     public void run() {
         //FIXME this activated before autoscaler deployer activated.
@@ -428,13 +434,13 @@ public class AutoscalerHealthStatReceiver implements 
Runnable {
         Thread thread = new Thread(healthStatReceiver);
         thread.start();
         if(log.isInfoEnabled()) {
-            log.info("Autoscaler topology receiver thread started");
+            log.info("Autoscaler heal stat receiver thread started");
         }
 
         // Keep the thread live until terminated
         while (!terminated);
         if(log.isInfoEnabled()) {
-            log.info("Autoscaler topology receiver thread terminated");
+            log.info("Autoscaler health stat receiver thread terminated");
         }
     }
 

Reply via email to