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 interface
Creates an outbound observer for the given inbound observer. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic OutboundObserverFactory
clientBuffered
(ExecutorService executorService) Create a bufferingOutboundObserverFactory
for client-side RPCs with the specifiedExecutorService
and the default buffer size.static OutboundObserverFactory
clientBuffered
(ExecutorService executorService, int bufferSize) Create a bufferingOutboundObserverFactory
for client-side RPCs with the specifiedExecutorService
and buffer size.static OutboundObserverFactory
Create the defaultOutboundObserverFactory
for 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 OutboundObserverFactory
LikeclientDirect()
but for server-side RPCs.static OutboundObserverFactory
trivial()
Creates anOutboundObserverFactory
that simply delegates to the base factory, with no flow control or synchronization.
-
Constructor Details
-
OutboundObserverFactory
public OutboundObserverFactory()
-
-
Method Details
-
clientBuffered
Create a bufferingOutboundObserverFactory
for client-side RPCs with the specifiedExecutorService
and the default buffer size. AllStreamObserver
s created by this factory are thread safe. -
clientBuffered
public static OutboundObserverFactory clientBuffered(ExecutorService executorService, int bufferSize) Create a bufferingOutboundObserverFactory
for client-side RPCs with the specifiedExecutorService
and buffer size. AllStreamObserver
s created by this factory are thread safe. -
clientDirect
Create the defaultOutboundObserverFactory
for client-side RPCs, which uses basic unbuffered flow control. AllStreamObserver
s created by this factory are thread safe. -
serverDirect
LikeclientDirect()
but for server-side RPCs. -
trivial
Creates anOutboundObserverFactory
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.
-