arturobernalg commented on code in PR #592:
URL:
https://github.com/apache/httpcomponents-core/pull/592#discussion_r2653638351
##########
httpcore5/src/main/java/org/apache/hc/core5/reactor/IOSession.java:
##########
@@ -96,6 +96,27 @@ enum Status {
*/
void enqueue(Command command, Command.Priority priority);
+ /**
+ * Returns the number of enqueued commands pending execution.
+ *
+ * @since 5.5
+ */
+ default int getPendingCommandCount() {
+ return 0;
+ }
+
+ /**
+ * Inserts {@link Command} at the end of the command queue if the number of
+ * enqueued commands pending execution is below the provided maximum.
+ *
+ * @return {@code true} if the command was enqueued, {@code false}
otherwise.
+ * @since 5.5
+ */
+ default boolean enqueue(final Command command, final Command.Priority
priority, final int maxPendingCommands) {
Review Comment:
@ok2c I just drop the IOSession-level enqueue/queue-limit API and keep the
cap/reject logic strictly in the HTTP/2 requester/handler layer as requested.
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]