BeamFnDataInboundObserver2.@Deprecated public class BeamFnDataInboundObserver extends java.lang.Object implements java.util.function.BiConsumer<org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.ByteString,java.lang.Boolean>, InboundDataClient
ByteStrings with the provided Coder passing the
individual decoded elements to the provided consumer.| Constructor and Description |
|---|
BeamFnDataInboundObserver(LogicalEndpoint endpoint,
FnDataReceiver<org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.ByteString> consumer,
InboundDataClient readFuture)
Deprecated.
|
| Modifier and Type | Method and Description |
|---|---|
void |
accept(org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.ByteString payload,
java.lang.Boolean isLast)
Deprecated.
|
void |
awaitCompletion()
Deprecated.
Block until the client has completed reading from the inbound stream.
|
void |
cancel()
Deprecated.
Cancels the client, causing it to drop any future inbound data.
|
void |
complete()
Deprecated.
Mark the client as completed.
|
void |
fail(java.lang.Throwable t)
Deprecated.
Mark the client as completed with an exception.
|
static BeamFnDataInboundObserver |
forConsumer(LogicalEndpoint endpoint,
FnDataReceiver<org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.ByteString> receiver)
Deprecated.
|
boolean |
isDone()
Deprecated.
Returns true if the client is done, either via completing successfully or by being cancelled.
|
void |
runWhenComplete(java.lang.Runnable completeRunnable)
Deprecated.
Runs the runnable once the client has completed reading from the inbound stream.
|
public BeamFnDataInboundObserver(LogicalEndpoint endpoint, FnDataReceiver<org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.ByteString> consumer, InboundDataClient readFuture)
public static BeamFnDataInboundObserver forConsumer(LogicalEndpoint endpoint, FnDataReceiver<org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.ByteString> receiver)
public void accept(org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.ByteString payload,
java.lang.Boolean isLast)
accept in interface java.util.function.BiConsumer<org.apache.beam.vendor.grpc.v1p43p2.com.google.protobuf.ByteString,java.lang.Boolean>public void awaitCompletion()
throws java.lang.Exception
InboundDataClientawaitCompletion in interface InboundDataClientjava.lang.InterruptedException - if the client is interrupted before completing.java.util.concurrent.CancellationException - if the client is cancelled before completing.java.lang.Exception - if the client throws an exception while awaiting completion.public void runWhenComplete(java.lang.Runnable completeRunnable)
InboundDataClientrunWhenComplete in interface InboundDataClientpublic boolean isDone()
InboundDataClientisDone in interface InboundDataClientpublic void cancel()
InboundDataClientcancel in interface InboundDataClientpublic void complete()
InboundDataClientcomplete in interface InboundDataClientpublic void fail(java.lang.Throwable t)
InboundDataClientfail in interface InboundDataClientt - the throwable that caused this client to fail