gaoran10 opened a new pull request #9532:
URL: https://github.com/apache/pulsar/pull/9532
### Motivation
Currently, we could specify the param `maxSizeBytes` when reading entries by
the method `asyncReadEntriesOrWait`, but this method will be blocked when there
are no entries to read. So I want to add a new method to read entries with
param `maxSizeBytes` and return data immediately if there are no entries to
read.
### Modifications
1. Add a new method `asyncReadEntriesOrWait(int maxEntries, long
maxSizeBytes, ReadEntriesCallback callback, Object ctx,
PositionImpl maxPosition)` in the interface
`ManagedCursor`.
2. Add a new method `asyncReadEntriesOrWait(int maxEntries, long
maxSizeBytes, ReadEntriesCallback callback, Object ctx,
PositionImpl maxPosition)` in the interface
`ReadOnlyCursor`.
### Verifying this change
This change added tests and can be verified as follows:
- *Added a test for reading entries with max size bytes*
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
- Dependencies (does it add or upgrade a dependency): (no)
- The public API: (yes)
- The schema: (no)
- The default values of configurations: (no)
- The wire protocol: (no)
- The rest endpoints: (no)
- The admin cli options: (no)
- Anything that affects deployment: (no)
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]