lhotari commented on code in PR #24623:
URL: https://github.com/apache/pulsar/pull/24623#discussion_r2303460026


##########
managed-ledger/src/main/java/org/apache/bookkeeper/mledger/Entry.java:
##########
@@ -67,6 +67,17 @@ public interface Entry {
      */
     boolean release();
 
+    /**
+     * Managed Ledger implementations of EntryImpl should implement this 
method to return the read count handler
+     * associated with the entry.
+     * This handler is used to track how many times the entry has been read 
and to manage
+     * the eviction of entries from the broker cache based on their expected 
read count.
+     * @return
+     */
+    default EntryReadCountHandler getReadCountHandler() {
+        return null;
+    }

Review Comment:
   Yes, to not break the existing Entry interface. Custom ManagedLedger 
implementations would break if there wouldn't be a default implementation. For 
example, StreamNative's Ursa has a custom ManagedLedger implementation.



-- 
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: commits-unsubscr...@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to