You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by im...@apache.org on 2014/12/12 09:41:37 UTC

stratos git commit: Changing info logs to debug in TopologyLockHierarchy

Repository: stratos
Updated Branches:
  refs/heads/4.1.0-test d106a0504 -> e50e94c6f


Changing info logs to debug in TopologyLockHierarchy


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

Branch: refs/heads/4.1.0-test
Commit: e50e94c6f6c997db8582e795f6dd4fb52df63bd9
Parents: d106a05
Author: Imesh Gunaratne <im...@apache.org>
Authored: Fri Dec 12 14:11:28 2014 +0530
Committer: Imesh Gunaratne <im...@apache.org>
Committed: Fri Dec 12 14:11:28 2014 +0530

----------------------------------------------------------------------
 .../topology/locking/TopologyLockHierarchy.java | 24 +++++++++++++-------
 1 file changed, 16 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/e50e94c6/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/locking/TopologyLockHierarchy.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/locking/TopologyLockHierarchy.java b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/locking/TopologyLockHierarchy.java
index e89df3a..feae65e 100644
--- a/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/locking/TopologyLockHierarchy.java
+++ b/components/org.apache.stratos.messaging/src/main/java/org/apache/stratos/messaging/domain/topology/locking/TopologyLockHierarchy.java
@@ -70,12 +70,14 @@ public class TopologyLockHierarchy {
             synchronized (serviceNameToTopologyLockMap) {
                 if (!serviceNameToTopologyLockMap.containsKey(serviceName)) {
                     serviceNameToTopologyLockMap.put(serviceName, topologyLock);
-                    log.info("Added lock for Service " + serviceName);
+                    if (log.isDebugEnabled()) {
+                        log.debug("Added lock for service " + serviceName);
+                    }
                 }
             }
         } else {
             if (log.isDebugEnabled()) {
-                log.debug("Topology Lock for Service " + serviceName + " already exists");
+                log.debug("Topology Lock for service " + serviceName + " already exists");
             }
         }
     }
@@ -90,12 +92,14 @@ public class TopologyLockHierarchy {
             synchronized (clusterIdToTopologyLockMap) {
                 if (!clusterIdToTopologyLockMap.containsKey(clusterId)) {
                     clusterIdToTopologyLockMap.put(clusterId, topologyLock);
-                    log.info("Added lock for Cluster " + clusterId);
+                    if (log.isDebugEnabled()) {
+                        log.debug("Added lock for cluster " + clusterId);
+                    }
                 }
             }
         } else {
             if (log.isDebugEnabled()) {
-                log.debug("Topology Lock for Cluster " + clusterId + " already exists");
+                log.debug("Topology lock for cluster " + clusterId + " already exists");
             }
         }
     }
@@ -106,20 +110,24 @@ public class TopologyLockHierarchy {
 
     public void removeTopologyLockForService (String serviceName) {
         if (serviceNameToTopologyLockMap.remove(serviceName) != null) {
-            log.info("Removed lock for Service " + serviceName);
+            if (log.isDebugEnabled()) {
+                log.debug("Removed lock for service " + serviceName);
+            }
         } else {
             if (log.isDebugEnabled()) {
-                log.debug("Lock already removed for Service " + serviceName);
+                log.debug("Lock already removed for service " + serviceName);
             }
         }
     }
 
     public void removeTopologyLockForCluster (String clusterId) {
         if (clusterIdToTopologyLockMap.remove(clusterId) != null) {
-            log.info("Removed lock for Cluster " + clusterId);
+            if (log.isDebugEnabled()) {
+                log.debug("Removed lock for cluster " + clusterId);
+            }
         } else {
             if (log.isDebugEnabled()) {
-                log.debug("Lock already removed for Cluster " + clusterId);
+                log.debug("Lock already removed for cluster " + clusterId);
             }
         }
     }