Class OutboundObserverFactory

java.lang.Object
org.apache.beam.sdk.fn.stream.OutboundObserverFactory

public abstract class OutboundObserverFactory extends Object
Creates factories which determine an underlying StreamObserver implementation to use in to interact with fn execution APIs.
  • Constructor Details

    • OutboundObserverFactory

      public OutboundObserverFactory()
  • Method Details

    • clientBuffered

      public static OutboundObserverFactory clientBuffered(ExecutorService executorService)
      Create a buffering OutboundObserverFactory for client-side RPCs with the specified ExecutorService and the default buffer size. All StreamObservers created by this factory are thread safe.
    • clientBuffered

      public static OutboundObserverFactory clientBuffered(ExecutorService executorService, int bufferSize)
      Create a buffering OutboundObserverFactory for client-side RPCs with the specified ExecutorService and buffer size. All StreamObservers created by this factory are thread safe.
    • clientDirect

      public static OutboundObserverFactory clientDirect()
      Create the default OutboundObserverFactory for client-side RPCs, which uses basic unbuffered flow control. All StreamObservers created by this factory are thread safe.
    • serverDirect

      public static OutboundObserverFactory serverDirect()
      Like clientDirect() but for server-side RPCs.
    • trivial

      public static OutboundObserverFactory trivial()
      Creates an OutboundObserverFactory that simply delegates to the base factory, with no flow control or synchronization. Not recommended for use except in tests.
    • outboundObserverFor

      public abstract <ReqT, RespT> org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver<RespT> outboundObserverFor(OutboundObserverFactory.BasicFactory<ReqT,RespT> baseOutboundObserverFactory, org.apache.beam.vendor.grpc.v1p69p0.io.grpc.stub.StreamObserver<ReqT> inboundObserver)
      Creates an outbound observer for the given inbound observer by potentially inserting hooks into the inbound and outbound observers.
      Parameters:
      baseOutboundObserverFactory - A base function to create an outbound observer from an inbound observer.
      inboundObserver - The inbound observer.