ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sath...@apache.org
Subject [03/30] ode git commit: Third commit
Date Fri, 06 Nov 2015 10:55:13 GMT
Third commit


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

Branch: refs/heads/master
Commit: 764bf642f5b37f134ca6a4c505a80f7b0d81d1f2
Parents: 79c0b16
Author: suba <suba.11@cse.mrt.ac.lk>
Authored: Tue Jun 9 23:29:43 2015 +0530
Committer: suba <suba.11@cse.mrt.ac.lk>
Committed: Tue Jun 9 23:29:43 2015 +0530

----------------------------------------------------------------------
 .../org/apache/ode/axis2/deploy/DeploymentPoller.java |  8 ++++----
 .../clustering/hazelcast/HazelcastClusterImpl.java    | 14 ++++++++++++--
 2 files changed, 16 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/764bf642/axis2/src/main/java/org/apache/ode/axis2/deploy/DeploymentPoller.java
----------------------------------------------------------------------
diff --git a/axis2/src/main/java/org/apache/ode/axis2/deploy/DeploymentPoller.java b/axis2/src/main/java/org/apache/ode/axis2/deploy/DeploymentPoller.java
index 057c0fb..25d7f20 100644
--- a/axis2/src/main/java/org/apache/ode/axis2/deploy/DeploymentPoller.java
+++ b/axis2/src/main/java/org/apache/ode/axis2/deploy/DeploymentPoller.java
@@ -341,15 +341,15 @@ public class DeploymentPoller {
     //Implementation of IMap key Lock
     public boolean lock(String key) {
         if(clusterEnabled) {
-            _odeServer.getBpelServer().getContexts().hazelcastClusterImpl.lock(key);
+            return _odeServer.getBpelServer().getContexts().hazelcastClusterImpl.lock(key);
         }
-        return true;
+        else return true;
     }
 
     public boolean unlock(String key) {
         if(clusterEnabled) {
-            _odeServer.getBpelServer().getContexts().hazelcastClusterImpl.unlock(key);
+            return _odeServer.getBpelServer().getContexts().hazelcastClusterImpl.unlock(key);
         }
-        return true;
+        else return true;
     }
 }

http://git-wip-us.apache.org/repos/asf/ode/blob/764bf642/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastClusterImpl.java
----------------------------------------------------------------------
diff --git a/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastClusterImpl.java
b/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastClusterImpl.java
index 2cff4c8..c387b74 100644
--- a/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastClusterImpl.java
+++ b/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastClusterImpl.java
@@ -69,12 +69,22 @@ public class HazelcastClusterImpl implements HazelcastCluster{
         return hostName + ":" + port;
     }
 
-    public void lock(String key) {
+    public boolean lock(String key) {
         lock_map.lock(key);
+        boolean state = lock_map.isLocked(key);
+        if (__log.isDebugEnabled()) {
+        __log.debug ("ThreadID:" + Thread.currentThread().getId() + " duLocked value for
" + key + " file" + " after locking: " + state);
+        }
+        return state;
     }
 
-    public void unlock(String key) {
+    public boolean unlock(String key) {
         lock_map.unlock(key);
+        boolean state = lock_map.isLocked(key);
+        if (__log.isDebugEnabled()) {
+        __log.debug("ThreadID:" + Thread.currentThread().getId() + " duLocked value for "
+ key + " file" + " after unlocking: " + state);
+        }
+        return state;
     }
 
     class ClusterMemberShipListener implements MembershipListener {


Mime
View raw message