activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject [2/5] git commit: https://issues.apache.org/jira/browse/AMQ-4705 - implement keepAlive with a delegation to channel lock isValid
Date Mon, 02 Sep 2013 23:40:05 GMT
https://issues.apache.org/jira/browse/AMQ-4705 - implement keepAlive with a delegation to channel
lock isValid


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

Branch: refs/heads/trunk
Commit: 0525f88639b1a14686ed96a3507eccb238235144
Parents: 634a818
Author: gtully <gtully@apache.org>
Authored: Tue Sep 3 00:30:48 2013 +0100
Committer: gtully <gtully@apache.org>
Committed: Tue Sep 3 00:30:48 2013 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/activemq/store/SharedFileLocker.java   | 5 +++++
 .../src/main/java/org/apache/activemq/util/LockFile.java        | 4 ++++
 2 files changed, 9 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/0525f886/activemq-broker/src/main/java/org/apache/activemq/store/SharedFileLocker.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/store/SharedFileLocker.java
b/activemq-broker/src/main/java/org/apache/activemq/store/SharedFileLocker.java
index 0a5f53d..e1b51df 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/store/SharedFileLocker.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/store/SharedFileLocker.java
@@ -75,6 +75,11 @@ public class SharedFileLocker extends AbstractLocker {
     }
 
     @Override
+    public boolean keepAlive() {
+        return lockFile != null && lockFile.keepAlive();
+    }
+
+    @Override
     public void doStop(ServiceStopper stopper) throws Exception {
         lockFile.unlock();
         lockFile=null;

http://git-wip-us.apache.org/repos/asf/activemq/blob/0525f886/activemq-broker/src/main/java/org/apache/activemq/util/LockFile.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/util/LockFile.java b/activemq-broker/src/main/java/org/apache/activemq/util/LockFile.java
index a3659f4..ace6181 100644
--- a/activemq-broker/src/main/java/org/apache/activemq/util/LockFile.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/util/LockFile.java
@@ -139,4 +139,8 @@ public class LockFile {
 
     }
 
+    public boolean keepAlive() {
+        return lock != null && lock.isValid();
+    }
+
 }


Mime
View raw message