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:10:31 GMT
Repository: bookkeeper
Updated Branches:
  refs/heads/master 6a94e45c6 -> 78d6e49d4


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/78d6e49d
Tree: http://git-wip-us.apache.org/repos/asf/bookkeeper/tree/78d6e49d
Diff: http://git-wip-us.apache.org/repos/asf/bookkeeper/diff/78d6e49d

Branch: refs/heads/master
Commit: 78d6e49d4d6bf83ee53655e6198848b896c4239c
Parents: 6a94e45
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:10:20 2014 +0100

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


http://git-wip-us.apache.org/repos/asf/bookkeeper/blob/78d6e49d/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 5324a4e..4dc93ea 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -18,6 +18,8 @@ Trunk (unreleased changes)
 
     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/78d6e49d/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