cloudstack-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kelv...@apache.org
Subject git commit: updated refs/heads/master to f2ad38a
Date Tue, 02 Apr 2013 18:25:29 GMT
Updated Branches:
  refs/heads/master 231367685 -> f2ad38aa0


CLOUDSTACK-1865: Change StatsCollector to be a manager so that it can initialize itself at
proper run level


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

Branch: refs/heads/master
Commit: f2ad38aa0f5623551fdd0a295219fb948030bd28
Parents: 2313676
Author: Kelven Yang <kelveny@gmail.com>
Authored: Mon Apr 1 18:25:06 2013 -0700
Committer: Kelven Yang <kelveny@gmail.com>
Committed: Tue Apr 2 11:22:56 2013 -0700

----------------------------------------------------------------------
 server/src/com/cloud/server/StatsCollector.java |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cloudstack/blob/f2ad38aa/server/src/com/cloud/server/StatsCollector.java
----------------------------------------------------------------------
diff --git a/server/src/com/cloud/server/StatsCollector.java b/server/src/com/cloud/server/StatsCollector.java
index b1f4a57..05be0e2 100755
--- a/server/src/com/cloud/server/StatsCollector.java
+++ b/server/src/com/cloud/server/StatsCollector.java
@@ -66,6 +66,7 @@ import com.cloud.storage.dao.VolumeDao;
 import com.cloud.storage.secondary.SecondaryStorageVmManager;
 import com.cloud.utils.NumbersUtil;
 import com.cloud.utils.component.ComponentMethodInterceptable;
+import com.cloud.utils.component.ManagerBase;
 import com.cloud.utils.concurrency.NamedThreadFactory;
 import com.cloud.utils.db.SearchCriteria;
 import com.cloud.vm.UserVmManager;
@@ -78,7 +79,7 @@ import com.cloud.vm.dao.UserVmDao;
  *
  */
 @Component
-public class StatsCollector implements ComponentMethodInterceptable {
+public class StatsCollector extends ManagerBase implements ComponentMethodInterceptable {
 	public static final Logger s_logger = Logger.getLogger(StatsCollector.class.getName());
 
 	private static StatsCollector s_instance = null;
@@ -122,10 +123,11 @@ public class StatsCollector implements ComponentMethodInterceptable
{
 		s_instance = this;
 	}
 
-    @PostConstruct
-    private void init(){
+	@Override
+	public boolean start() {
         init(_configDao.getConfiguration());
-    }
+		return true;
+	}
 
 	private void init(Map<String, String> configs) {
 		_executor = Executors.newScheduledThreadPool(3, new NamedThreadFactory("StatsCollector"));


Mime
View raw message