merlimat commented on a change in pull request #1219: Xzy initialize 
subscription config
URL: https://github.com/apache/incubator-pulsar/pull/1219#discussion_r167657680
 
 

 ##########
 File path: 
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/ManagedLedger.java
 ##########
 @@ -138,6 +138,20 @@
      */
     public ManagedCursor openCursor(String name) throws InterruptedException, 
ManagedLedgerException;
 
+    /**
+     * Open a ManagedCursor in this ManagedLedger.
+     * <p>
+     * If the cursors doesn't exist, a new one will be created and its 
position will be at the end of the ManagedLedger.
+     *
+     * @param name
+     *            the name associated with the ManagedCursor
+     * @param initializeOnLatest
+     *            the flag tell the method wthether it should intialize the 
cursor at latest position or not.
+     * @return the ManagedCursor
+     * @throws ManagedLedgerException
+     */
+    public ManagedCursor openCursor(String name, boolean initializeOnLatest) 
throws InterruptedException, ManagedLedgerException;
 
 Review comment:
   Another option here is to reuse  `Position` class: 
   
   eg: 
   ```java
   managedLedger.openCursor("name", Position.earliest);
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to