Package org.apache.beam.sdk.fn.stream
Class OutboundObserverFactory
java.lang.Object
org.apache.beam.sdk.fn.stream.OutboundObserverFactory
Creates factories which determine an underlying
StreamObserver implementation to use in
to interact with fn execution APIs.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceCreates an outbound observer for the given inbound observer. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OutboundObserverFactoryclientBuffered(ExecutorService executorService) Create a bufferingOutboundObserverFactoryfor client-side RPCs with the specifiedExecutorServiceand the default buffer size.static OutboundObserverFactoryclientBuffered(ExecutorService executorService, int bufferSize) Create a bufferingOutboundObserverFactoryfor client-side RPCs with the specifiedExecutorServiceand buffer size.static OutboundObserverFactoryCreate the defaultOutboundObserverFactoryfor client-side RPCs, which uses basic unbuffered flow control.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.static OutboundObserverFactoryLikeclientDirect()but for server-side RPCs.static OutboundObserverFactorytrivial()Creates anOutboundObserverFactorythat simply delegates to the base factory, with no flow control or synchronization.
-
Constructor Details
-
OutboundObserverFactory
public OutboundObserverFactory()
-
-
Method Details
-
clientBuffered
Create a bufferingOutboundObserverFactoryfor client-side RPCs with the specifiedExecutorServiceand the default buffer size. AllStreamObservers created by this factory are thread safe. -
clientBuffered
public static OutboundObserverFactory clientBuffered(ExecutorService executorService, int bufferSize) Create a bufferingOutboundObserverFactoryfor client-side RPCs with the specifiedExecutorServiceand buffer size. AllStreamObservers created by this factory are thread safe. -
clientDirect
Create the defaultOutboundObserverFactoryfor client-side RPCs, which uses basic unbuffered flow control. AllStreamObservers created by this factory are thread safe. -
serverDirect
LikeclientDirect()but for server-side RPCs. -
trivial
Creates anOutboundObserverFactorythat 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.
-