scwhittle commented on code in PR #26631:
URL: https://github.com/apache/beam/pull/26631#discussion_r1285816451
##########
sdks/java/fn-execution/src/main/java/org/apache/beam/sdk/fn/stream/ForwardingClientResponseObserver.java:
##########
@@ -25,23 +25,27 @@
* A {@link ClientResponseObserver} which delegates all {@link StreamObserver}
calls.
*
* <p>Used to wrap existing {@link StreamObserver}s to be able to install an
{@link
- * ClientCallStreamObserver#setOnReadyHandler(Runnable) onReadyHandler}.
+ * ClientCallStreamObserver#setOnReadyHandler(Runnable) onReadyHandler} and a
handler invoked when
+ * the stream terminates.
*
* <p>This is as thread-safe as the underlying stream observer that is being
wrapped.
*/
public final class ForwardingClientResponseObserver<ReqT, RespT>
implements ClientResponseObserver<RespT, ReqT> {
public static <ReqT, RespT> ForwardingClientResponseObserver<ReqT, RespT>
create(
- StreamObserver<ReqT> inbound, Runnable onReadyHandler) {
- return new ForwardingClientResponseObserver<>(inbound, onReadyHandler);
+ StreamObserver<ReqT> inbound, Runnable onReadyHandler, Runnable
onDoneHandler) {
Review Comment:
It is internal AFAIK but it seems safer to add overload so went with that.
--
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]