bookkeeper-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From iv...@apache.org
Subject bookkeeper git commit: BOOKKEEPER-800: Expose whether a ledger is closed or not (ivank)
Date Fri, 05 Dec 2014 13:29:29 GMT
Repository: bookkeeper
Updated Branches:
  refs/heads/branch-4.3 3a6830c05 -> 0459764b6


BOOKKEEPER-800: Expose whether a ledger is closed or not (ivank)


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

Branch: refs/heads/branch-4.3
Commit: 0459764b64910b799f9c37320e3202db4e955e06
Parents: 3a6830c
Author: Ivan Kelly <ivank@apache.org>
Authored: Fri Dec 5 14:10:20 2014 +0100
Committer: Ivan Kelly <ivank@apache.org>
Committed: Fri Dec 5 14:11:22 2014 +0100

----------------------------------------------------------------------
 CHANGES.txt                                                   | 4 ++++
 .../main/java/org/apache/bookkeeper/client/LedgerHandle.java  | 7 +++++++
 2 files changed, 11 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/0459764b/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 85b88c0..0b9a756 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -6,6 +6,10 @@ Release 4.3.1 - unreleased
 
       BOOKKEEPER-815: Ledger fence state is lost when the ledger file is evicted (Charles
Xie via ivank)
 
+    IMPROVEMENTS:
+
+      BOOKKEEPER-800: Expose whether a ledger is closed or not (ivank)
+
 Release 4.3.0 - 2014-10-03
 
   Non-backward compatible changes:

http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/0459764b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
----------------------------------------------------------------------
diff --git a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
index 7204d6c..0265990 100644
--- a/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
+++ b/bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerHandle.java
@@ -251,6 +251,13 @@ public class LedgerHandle {
         asyncCloseInternal(cb, ctx, BKException.Code.LedgerClosedException);
     }
 
+    /**
+     * Has the ledger been closed?
+     */
+    public boolean isClosed() {
+        return metadata.isClosed();
+    }
+
     void asyncCloseInternal(final CloseCallback cb, final Object ctx, final int rc) {
         try {
             doAsyncCloseInternal(cb, ctx, rc);


Mime
View raw message