Interface RemoteEnvironment
-
- All Superinterfaces:
java.lang.AutoCloseable
- All Known Implementing Classes:
ProcessEnvironment,RemoteEnvironment.SimpleRemoteEnvironment,StaticRemoteEnvironment
public interface RemoteEnvironment extends java.lang.AutoCloseableA handle to an available remoteRunnerApi.Environment. This environment is connected to a Fn API Control service, and the associated client is available viagetInstructionRequestHandler().
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRemoteEnvironment.SimpleRemoteEnvironmentARemoteEnvironmentwhich uses the defaultclose()behavior.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose().static RemoteEnvironmentforHandler(org.apache.beam.model.pipeline.v1.RunnerApi.Environment env, InstructionRequestHandler handler)Create a newRemoteEnvironmentfor the providedRunnerApi.EnvironmentandAutoCloseableInstructionRequestHandler.org.apache.beam.model.pipeline.v1.RunnerApi.EnvironmentgetEnvironment()Return the environment that the remote handles.InstructionRequestHandlergetInstructionRequestHandler()Return anInstructionRequestHandlerwhich can communicate with the environment.
-
-
-
Method Detail
-
forHandler
static RemoteEnvironment forHandler(org.apache.beam.model.pipeline.v1.RunnerApi.Environment env, InstructionRequestHandler handler)
Create a newRemoteEnvironmentfor the providedRunnerApi.EnvironmentandAutoCloseableInstructionRequestHandler.When the
RemoteEnvironmentis closed, theInstructionRequestHandlerwill be closed.
-
getEnvironment
org.apache.beam.model.pipeline.v1.RunnerApi.Environment getEnvironment()
Return the environment that the remote handles.
-
getInstructionRequestHandler
InstructionRequestHandler getInstructionRequestHandler()
Return anInstructionRequestHandlerwhich can communicate with the environment.
-
close
default void close() throws java.lang.Exception.By default, closes the
getInstructionRequestHandler().- Specified by:
closein interfacejava.lang.AutoCloseable- Throws:
java.lang.Exception
-
-