stratos-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From im...@apache.org
Subject stratos git commit: Renaming executor service identifiers
Date Tue, 09 Dec 2014 10:13:53 GMT
Repository: stratos
Updated Branches:
  refs/heads/4.1.0-test a69a91dcd -> 0a07475d5


Renaming executor service identifiers


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

Branch: refs/heads/4.1.0-test
Commit: 0a07475d5841fa80d5d3632c0067866f825bd9df
Parents: a69a91d
Author: Imesh Gunaratne <imesh@apache.org>
Authored: Tue Dec 9 15:43:39 2014 +0530
Committer: Imesh Gunaratne <imesh@apache.org>
Committed: Tue Dec 9 15:43:39 2014 +0530

----------------------------------------------------------------------
 .../cloud/controller/iaases/mock/MockIaasService.java     |  6 +++---
 .../stratos/cloud/controller/iaases/mock/MockMember.java  | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/0a07475d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/MockIaasService.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/MockIaasService.java
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/MockIaasService.java
index 0692239..db1a46d 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/MockIaasService.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/MockIaasService.java
@@ -50,8 +50,8 @@ public class MockIaasService {
 
     private static final Log log = LogFactory.getLog(MockIaasService.class);
 
-    private static final ExecutorService executorService = StratosThreadPool.getExecutorService("MOCK_MEMBER_THREAD_EXECUTOR",
-            MockConstants.MAX_MOCK_MEMBER_COUNT);
+    private static final ExecutorService mockMemberExecutorService =
+            StratosThreadPool.getExecutorService("MOCK_MEMBER_EXECUTOR_SERVICE", MockConstants.MAX_MOCK_MEMBER_COUNT);
     private static final String MOCK_IAAS_MEMBERS = "/mock/iaas/members";
     private static volatile MockIaasService instance;
 
@@ -100,7 +100,7 @@ public class MockIaasService {
                     memberContext.getPartition().getId(), memberContext.getInstanceId());
             MockMember mockMember = new MockMember(mockMemberContext);
             membersMap.put(mockMember.getMockMemberContext().getMemberId(), mockMember);
-            executorService.submit(mockMember);
+            mockMemberExecutorService.submit(mockMember);
 
             // Prepare node metadata
             MockNodeMetadata nodeMetadata = new MockNodeMetadata();

http://git-wip-us.apache.org/repos/asf/stratos/blob/0a07475d/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/MockMember.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/MockMember.java
b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/MockMember.java
index f97ccaf..007a87a 100644
--- a/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/MockMember.java
+++ b/components/org.apache.stratos.cloud.controller/src/main/java/org/apache/stratos/cloud/controller/iaases/mock/MockMember.java
@@ -42,10 +42,10 @@ public class MockMember implements Runnable, Serializable {
 
     private static final Log log = LogFactory.getLog(MockMember.class);
     private static final ExecutorService instanceNotifierExecutorService =
-            StratosThreadPool.getExecutorService("MOCK_MEMBER_INSTANCE_NOTIFIER",
+            StratosThreadPool.getExecutorService("MOCK_MEMBER_INSTANCE_NOTIFIER_EXECUTOR_SERVICE",
                     MockConstants.MAX_MOCK_MEMBER_COUNT);
-    private static final ScheduledExecutorService healthStatPublisherExecutorService =
-            StratosThreadPool.getScheduledExecutorService("MOCK_MEMBER_HEALTH_STAT_PUBLISHER",
+    private static final ScheduledExecutorService healthStatNotifierExecutorService =
+            StratosThreadPool.getScheduledExecutorService("MOCK_MEMBER_HEALTH_STAT_NOTIFIER_EXECUTOR_SERVICE",
                     MockConstants.MAX_MOCK_MEMBER_COUNT);
     private static final int HEALTH_STAT_INTERVAL = 15; // 15 seconds
 
@@ -121,7 +121,6 @@ public class MockMember implements Runnable, Serializable {
 
     private void handleMemberTermination() {
         MockMemberEventPublisher.publishMaintenanceModeEvent(mockMemberContext);
-
         sleep(2000);
         MockMemberEventPublisher.publishInstanceReadyToShutdownEvent(mockMemberContext);
     }
@@ -130,7 +129,8 @@ public class MockMember implements Runnable, Serializable {
         if (log.isDebugEnabled()) {
             log.debug(String.format("Starting health statistics notifier: [member-id] %s",
mockMemberContext.getMemberId()));
         }
-        healthStatPublisherExecutorService.scheduleAtFixedRate(new MockHealthStatisticsNotifier(mockMemberContext),
+
+        healthStatNotifierExecutorService.scheduleAtFixedRate(new MockHealthStatisticsNotifier(mockMemberContext),
                 HEALTH_STAT_INTERVAL, HEALTH_STAT_INTERVAL, TimeUnit.SECONDS);
 
         if (log.isDebugEnabled()) {


Mime
View raw message