Interface FnDataService

  • All Known Implementing Classes:
    GrpcDataService

    public interface FnDataService
    The 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.
    • Method Summary

      All Methods Instance Methods Abstract Methods Deprecated Methods 
      Modifier and Type Method Description
      <T> org.apache.beam.sdk.fn.data.InboundDataClient receive​(org.apache.beam.sdk.fn.data.LogicalEndpoint inputLocation, org.apache.beam.sdk.coders.Coder<T> coder, org.apache.beam.sdk.fn.data.FnDataReceiver<T> listener)
      Registers a receiver to be notified upon any incoming elements.
      <T> org.apache.beam.sdk.fn.data.CloseableFnDataReceiver<T> send​(org.apache.beam.sdk.fn.data.LogicalEndpoint outputLocation, org.apache.beam.sdk.coders.Coder<T> coder)
      Deprecated.
      Migrate to use BeamFnDataOutboundAggregator directly for sending outbound data.
    • Method Detail

      • receive

        <T> org.apache.beam.sdk.fn.data.InboundDataClient receive​(org.apache.beam.sdk.fn.data.LogicalEndpoint inputLocation,
                                                                  org.apache.beam.sdk.coders.Coder<T> coder,
                                                                  org.apache.beam.sdk.fn.data.FnDataReceiver<T> listener)
        Registers a receiver to be notified upon any incoming elements.

        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.

      • send

        @Deprecated
        <T> org.apache.beam.sdk.fn.data.CloseableFnDataReceiver<T> send​(org.apache.beam.sdk.fn.data.LogicalEndpoint outputLocation,
                                                                        org.apache.beam.sdk.coders.Coder<T> coder)
        Deprecated.
        Migrate to use BeamFnDataOutboundAggregator directly for sending outbound data.
        Creates a receiver to which you can write data values and have them sent over this data plane service.

        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.