public class BeamFnControlClient
extends java.lang.Object
Also can delegate to a set of handlers based upon the request type.
When the inbound instruction stream finishes successfully, the onFinish is completed
successfully signaling to the caller that this client will not produce any more BeamFnApi.InstructionRequests. If the inbound instruction stream errors, the onFinish is
completed exceptionally propagating the failure reason to the caller and signaling that this
client will not produce any more BeamFnApi.InstructionRequests.
| Constructor and Description |
|---|
BeamFnControlClient(java.lang.String id,
org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor apiServiceDescriptor,
org.apache.beam.sdk.fn.channel.ManagedChannelFactory channelFactory,
org.apache.beam.sdk.fn.stream.OutboundObserverFactory outboundObserverFactory,
java.util.EnumMap<org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionRequest.RequestCase,org.apache.beam.sdk.fn.function.ThrowingFunction<org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionRequest,org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionResponse.Builder>> handlers) |
| Modifier and Type | Method and Description |
|---|---|
org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionResponse |
delegateOnInstructionRequestType(org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionRequest value) |
void |
processInstructionRequests(java.util.concurrent.Executor executor)
Note that this method continuously submits work to the supplied executor until the Beam Fn
Control server hangs up or fails exceptionally.
|
void |
sendInstructionResponse(org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionResponse value) |
public BeamFnControlClient(java.lang.String id,
org.apache.beam.model.pipeline.v1.Endpoints.ApiServiceDescriptor apiServiceDescriptor,
org.apache.beam.sdk.fn.channel.ManagedChannelFactory channelFactory,
org.apache.beam.sdk.fn.stream.OutboundObserverFactory outboundObserverFactory,
java.util.EnumMap<org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionRequest.RequestCase,org.apache.beam.sdk.fn.function.ThrowingFunction<org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionRequest,org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionResponse.Builder>> handlers)
public void processInstructionRequests(java.util.concurrent.Executor executor)
throws java.lang.InterruptedException,
java.util.concurrent.ExecutionException
java.lang.InterruptedExceptionjava.util.concurrent.ExecutionExceptionpublic org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionResponse delegateOnInstructionRequestType(org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionRequest value)
public void sendInstructionResponse(org.apache.beam.model.fnexecution.v1.BeamFnApi.InstructionResponse value)