Package org.apache.beam.sdk.fn.data
Class BeamFnDataInboundObserver
- java.lang.Object
-
- org.apache.beam.sdk.fn.data.BeamFnDataInboundObserver
-
- All Implemented Interfaces:
java.util.function.BiConsumer<org.apache.beam.vendor.grpc.v1p48p1.com.google.protobuf.ByteString,java.lang.Boolean>,InboundDataClient
@Deprecated public class BeamFnDataInboundObserver extends java.lang.Object implements java.util.function.BiConsumer<org.apache.beam.vendor.grpc.v1p48p1.com.google.protobuf.ByteString,java.lang.Boolean>, InboundDataClient
Deprecated.Migrate toBeamFnDataInboundObserver2.Decodes individually consumedByteStrings with the providedCoderpassing the individual decoded elements to the provided consumer.
-
-
Constructor Summary
Constructors Constructor Description BeamFnDataInboundObserver(LogicalEndpoint endpoint, FnDataReceiver<org.apache.beam.vendor.grpc.v1p48p1.com.google.protobuf.ByteString> consumer, InboundDataClient readFuture)Deprecated.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description voidaccept(org.apache.beam.vendor.grpc.v1p48p1.com.google.protobuf.ByteString payload, java.lang.Boolean isLast)Deprecated.voidawaitCompletion()Deprecated.Block until the client has completed reading from the inbound stream.voidcancel()Deprecated.Cancels the client, causing it to drop any future inbound data.voidcomplete()Deprecated.Mark the client as completed.voidfail(java.lang.Throwable t)Deprecated.Mark the client as completed with an exception.static BeamFnDataInboundObserverforConsumer(LogicalEndpoint endpoint, FnDataReceiver<org.apache.beam.vendor.grpc.v1p48p1.com.google.protobuf.ByteString> receiver)Deprecated.booleanisDone()Deprecated.Returns true if the client is done, either via completing successfully or by being cancelled.voidrunWhenComplete(java.lang.Runnable completeRunnable)Deprecated.Runs the runnable once the client has completed reading from the inbound stream.
-
-
-
Constructor Detail
-
BeamFnDataInboundObserver
public BeamFnDataInboundObserver(LogicalEndpoint endpoint, FnDataReceiver<org.apache.beam.vendor.grpc.v1p48p1.com.google.protobuf.ByteString> consumer, InboundDataClient readFuture)
Deprecated.
-
-
Method Detail
-
forConsumer
public static BeamFnDataInboundObserver forConsumer(LogicalEndpoint endpoint, FnDataReceiver<org.apache.beam.vendor.grpc.v1p48p1.com.google.protobuf.ByteString> receiver)
Deprecated.
-
accept
public void accept(org.apache.beam.vendor.grpc.v1p48p1.com.google.protobuf.ByteString payload, java.lang.Boolean isLast)Deprecated.- Specified by:
acceptin interfacejava.util.function.BiConsumer<org.apache.beam.vendor.grpc.v1p48p1.com.google.protobuf.ByteString,java.lang.Boolean>
-
awaitCompletion
public void awaitCompletion() throws java.lang.ExceptionDeprecated.Description copied from interface:InboundDataClientBlock until the client has completed reading from the inbound stream.- Specified by:
awaitCompletionin interfaceInboundDataClient- Throws:
java.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.
-
runWhenComplete
public void runWhenComplete(java.lang.Runnable completeRunnable)
Deprecated.Description copied from interface:InboundDataClientRuns the runnable once the client has completed reading from the inbound stream.- Specified by:
runWhenCompletein interfaceInboundDataClient
-
isDone
public boolean isDone()
Deprecated.Description copied from interface:InboundDataClientReturns true if the client is done, either via completing successfully or by being cancelled.- Specified by:
isDonein interfaceInboundDataClient
-
cancel
public void cancel()
Deprecated.Description copied from interface:InboundDataClientCancels the client, causing it to drop any future inbound data.- Specified by:
cancelin interfaceInboundDataClient
-
complete
public void complete()
Deprecated.Description copied from interface:InboundDataClientMark the client as completed.- Specified by:
completein interfaceInboundDataClient
-
fail
public void fail(java.lang.Throwable t)
Deprecated.Description copied from interface:InboundDataClientMark the client as completed with an exception. Calls to awaitCompletion will terminate by throwing the provided exception.- Specified by:
failin interfaceInboundDataClient- Parameters:
t- the throwable that caused this client to fail
-
-