Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
JAVA-1772: Revisit multi-response callbacks
Motivation: In the previous version, multi-response ResponseCallback implementations had to explicitly indicate when to release the stream id. It's simpler to do it directly in InFlightHandler, provided that we have a simple way to test when a Frame is the last that the server will send (and we should ensure that this is always the case for future multi-response requests). Modifications: Replace ResponseCallback.holdStreamId() by isLastResponse(Frame). Remove DriverChannel.release(int). Keep track of orphaned ResponseCallbacks in InFlightHandler, and release them (and the stream id) when their last response is received. Result: ResponseCallbacks now only need to indicate how to identify the last frame, InFlightHandler handles the rest. Cancelled multi-response callbacks will be properly released.
- Loading branch information
Showing
7 changed files
with
163 additions
and
80 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.