codelipenghui commented on a change in pull request #11304:
URL: https://github.com/apache/pulsar/pull/11304#discussion_r684884709
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedgerFactory.java
##########
@@ -160,4 +161,14 @@ void asyncOpenReadOnlyCursor(String managedLedgerName,
Position startPosition, M
*/
void shutdown() throws InterruptedException, ManagedLedgerException;
+ /**
+ * Check managed ledger store has been initialized before.
+ *
+ * @param name {@link String}
+ * @return a future represents the result of the operation.
+ * an instance of {@link Boolean} is returned
+ * if the operation succeeds.
+ */
+ CompletableFuture<Boolean> checkManagedLedgerInitializedBefore(String
name);
Review comment:
```suggestion
CompletableFuture<Boolean> asyncExists(String name);
```
##########
File path:
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/MetaStore.java
##########
@@ -129,4 +131,14 @@ void asyncUpdateCursorInfo(String ledgerName, String
cursorName, ManagedCursorIn
* @throws MetaStoreException
*/
Iterable<String> getManagedLedgers() throws MetaStoreException;
+
+ /**
+ * Check path exists.
+ *
+ * @param path {@link String}
+ * @return a future represents the result of the operation.
+ * an instance of {@link Boolean} is returned
+ * if the operation succeeds.
+ */
+ CompletableFuture<Boolean> exists(String path);
Review comment:
```suggestion
CompletableFuture<Boolean> asyncExists(String ledgerName);
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]