@ThreadSafe public final class DirectStreamObserver<T> extends java.lang.Object implements org.apache.beam.vendor.grpc.v1p48p1.io.grpc.stub.StreamObserver<T>
StreamObserver which uses synchronization on the underlying CallStreamObserver
to provide thread safety.
Flow control with the underlying CallStreamObserver is handled with a Phaser
which waits for advancement of the phase if the CallStreamObserver is not ready. Creator
is expected to advance the Phaser whenever the underlying CallStreamObserver
becomes ready.
| Constructor and Description |
|---|
DirectStreamObserver(java.util.concurrent.Phaser phaser,
org.apache.beam.vendor.grpc.v1p48p1.io.grpc.stub.CallStreamObserver<T> outboundObserver) |
| Modifier and Type | Method and Description |
|---|---|
void |
onCompleted() |
void |
onError(java.lang.Throwable t) |
void |
onNext(T value) |
public DirectStreamObserver(java.util.concurrent.Phaser phaser,
org.apache.beam.vendor.grpc.v1p48p1.io.grpc.stub.CallStreamObserver<T> outboundObserver)
public void onNext(T value)
onNext in interface org.apache.beam.vendor.grpc.v1p48p1.io.grpc.stub.StreamObserver<T>public void onError(java.lang.Throwable t)
onError in interface org.apache.beam.vendor.grpc.v1p48p1.io.grpc.stub.StreamObserver<T>public void onCompleted()
onCompleted in interface org.apache.beam.vendor.grpc.v1p48p1.io.grpc.stub.StreamObserver<T>