ode-commits mailing list archives

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


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

Branch: refs/heads/master
Commit: 09a448675000801befa747c802a9043439418a81
Parents: f1f9f3f
Author: suba <suba.11@cse.mrt.ac.lk>
Authored: Thu Jul 9 10:25:51 2015 +0530
Committer: suba <suba.11@cse.mrt.ac.lk>
Committed: Thu Jul 9 10:25:51 2015 +0530

----------------------------------------------------------------------
 .../org/apache/ode/bpel/clapi/ClusterManager.java |  2 +-
 .../hazelcast/HazelcastClusterImpl.java           |  2 +-
 .../hazelcast/HazelcastDeploymentLock.java        |  6 ++++++
 .../hazelcast/HazelcastInstanceLock.java          | 18 ++++++++++++------
 4 files changed, 20 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/ode/blob/09a44867/bpel-api/src/main/java/org/apache/ode/bpel/clapi/ClusterManager.java
----------------------------------------------------------------------
diff --git a/bpel-api/src/main/java/org/apache/ode/bpel/clapi/ClusterManager.java b/bpel-api/src/main/java/org/apache/ode/bpel/clapi/ClusterManager.java
index 4616126..cbfb12f 100644
--- a/bpel-api/src/main/java/org/apache/ode/bpel/clapi/ClusterManager.java
+++ b/bpel-api/src/main/java/org/apache/ode/bpel/clapi/ClusterManager.java
@@ -33,7 +33,7 @@ public interface ClusterManager {
     /**
      * shutdown the cluster instance
      */
-    void shutdwon();
+    void shutdown();
 
     /**
      * Return whether the local member is Master or not

http://git-wip-us.apache.org/repos/asf/ode/blob/09a44867/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 8bd9c7d..57984c0 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
@@ -166,7 +166,7 @@ public class HazelcastClusterImpl implements ClusterManager {
         if(_hazelcastInstance != null) _hazelcastInstance.getLifecycleService().shutdown();
     }
 
-    public ClusterLock getDeplymentLock(){
+    public ClusterLock getDeploymentLock(){
         return _hazelcastDeploymentLock;
     }
 

http://git-wip-us.apache.org/repos/asf/ode/blob/09a44867/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastDeploymentLock.java
----------------------------------------------------------------------
diff --git a/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastDeploymentLock.java
b/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastDeploymentLock.java
index 34fa5d4..44bbea8 100644
--- a/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastDeploymentLock.java
+++ b/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastDeploymentLock.java
@@ -24,6 +24,8 @@ import org.apache.ode.bpel.clapi.ClusterLock;
 import org.apache.commons.logging.Log;
 import org.apache.commons.logging.LogFactory;
 
+import java.util.concurrent.TimeUnit;
+
 public class HazelcastDeploymentLock implements ClusterLock{
     private static final Log __log = LogFactory.getLog(HazelcastDeploymentLock.class);
 
@@ -60,4 +62,8 @@ public class HazelcastDeploymentLock implements ClusterLock{
         }
         return state;
     }
+
+    public boolean tryLockMap(String key,int time, TimeUnit tu) {
+        return true;
+    }
 }

http://git-wip-us.apache.org/repos/asf/ode/blob/09a44867/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastInstanceLock.java
----------------------------------------------------------------------
diff --git a/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastInstanceLock.java
b/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastInstanceLock.java
index e673a81..40f1d66 100644
--- a/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastInstanceLock.java
+++ b/clustering/src/main/java/org/apache/ode/clustering/hazelcast/HazelcastInstanceLock.java
@@ -36,7 +36,7 @@ public class HazelcastInstanceLock extends AbstractInstanceLockManager implement
         _lock_map = lock_map;
     }
 
-    private void putIfAbsent(String key, String keyVal) {
+    public void putIfAbsent(String key, String keyVal) {
         _lock_map.putIfAbsent(key, keyVal);
     }
 
@@ -85,12 +85,12 @@ public class HazelcastInstanceLock extends AbstractInstanceLockManager
implement
         }
     }
 
-    private boolean lockMap(String key) {
+    public boolean lockMap(String key) {
         _lock_map.lock(key);
         return true;
     }
 
-    private boolean unlockMap(String key) {
+    public boolean unlockMap(String key) {
         if (_lock_map.get(key) == "true") {
             _lock_map.unlock(key);
             _lock_map.replace(key,"false");
@@ -98,13 +98,19 @@ public class HazelcastInstanceLock extends AbstractInstanceLockManager
implement
         return true;
     }
 
-    private boolean tryLockMap(String key) {
+    public boolean tryLockMap(String key) {
         boolean state = _lock_map.tryLock(key);
         return state;
     }
 
-    private boolean tryLockMap(String key,int time, TimeUnit tu) {
-        boolean state = _lock_map.tryLock(key,time,tu);
+    public boolean tryLockMap(String key,int time, TimeUnit tu) {
+        boolean state = true;
+        try {
+        state = _lock_map.tryLock(key,time,tu);
+        } catch (InterruptedException ex) {
+            __log.error(ex);
+        }
+
         _lock_map.replace(key,"" +state);
         return state;
     }


Mime
View raw message