public interface FnDataService
FnDataService
is able to forward inbound elements to a consumer and is also a
consumer of outbound elements. Callers can register themselves as consumers for inbound elements
or can get a handle for a consumer for outbound elements.Modifier and Type | Method and Description |
---|---|
<T> InboundDataClient |
receive(LogicalEndpoint inputLocation,
Coder<org.apache.beam.sdk.util.WindowedValue<T>> coder,
FnDataReceiver<org.apache.beam.sdk.util.WindowedValue<T>> listener)
Registers a receiver to be notified upon any incoming elements.
|
<T> CloseableFnDataReceiver<org.apache.beam.sdk.util.WindowedValue<T>> |
send(LogicalEndpoint outputLocation,
Coder<org.apache.beam.sdk.util.WindowedValue<T>> coder)
Creates a receiver to which you can write data values and have them sent over this data plane
service.
|
<T> InboundDataClient receive(LogicalEndpoint inputLocation, Coder<org.apache.beam.sdk.util.WindowedValue<T>> coder, FnDataReceiver<org.apache.beam.sdk.util.WindowedValue<T>> listener)
The provided coder is used to decode inbound elements. The decoded elements are passed to the provided receiver.
Any failure during decoding or processing of the element will put the
InboundDataClient
into an error state such that
InboundDataClient.awaitCompletion()
will throw an exception.
The provided receiver is not required to be thread safe.
<T> CloseableFnDataReceiver<org.apache.beam.sdk.util.WindowedValue<T>> send(LogicalEndpoint outputLocation, Coder<org.apache.beam.sdk.util.WindowedValue<T>> coder)
The provided coder is used to encode elements on the outbound stream.
Closing the returned receiver signals the end of the stream.
The returned receiver is not thread safe.