Package org.apache.flink.runtime.rpc
Interface RpcSystem
-
- All Superinterfaces:
AutoCloseable,RpcSystemUtils
- All Known Implementing Classes:
CleanupOnCloseRpcSystem
public interface RpcSystem extends RpcSystemUtils, AutoCloseable
This interface serves as a factory interface for RPC services, with some additional utilities that are reliant on implementation details of the RPC service.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classRpcSystem.FixedThreadPoolExecutorConfigurationDescriptor for creating a thread-pool with a fixed number of threads.static classRpcSystem.ForkJoinExecutorConfigurationDescriptor for creating a fork-join thread-pool.static interfaceRpcSystem.RpcServiceBuilderBuilder forRpcService.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidclose()Hook to cleanup resources, like common thread pools or classloaders.static RpcSystemload()Loads the RpcSystem.static RpcSystemload(org.apache.flink.configuration.Configuration config)Loads the RpcSystem.RpcSystem.RpcServiceBuilderlocalServiceBuilder(org.apache.flink.configuration.Configuration configuration)Returns a builder for anRpcServicethat is only reachable from the local machine.RpcSystem.RpcServiceBuilderremoteServiceBuilder(org.apache.flink.configuration.Configuration configuration, String externalAddress, String externalPortRange)Returns a builder for anRpcServicethat is reachable from other machines.-
Methods inherited from interface org.apache.flink.runtime.rpc.RpcSystemUtils
getInetSocketAddressFromRpcUrl, getMaximumMessageSizeInBytes, getRpcUrl
-
-
-
-
Method Detail
-
localServiceBuilder
RpcSystem.RpcServiceBuilder localServiceBuilder(org.apache.flink.configuration.Configuration configuration)
Returns a builder for anRpcServicethat is only reachable from the local machine.- Parameters:
configuration- Flink configuration- Returns:
- rpc service builder
-
remoteServiceBuilder
RpcSystem.RpcServiceBuilder remoteServiceBuilder(org.apache.flink.configuration.Configuration configuration, @Nullable String externalAddress, String externalPortRange)
Returns a builder for anRpcServicethat is reachable from other machines.- Parameters:
configuration- Flink configurationexternalAddress- optional address under which the RpcService should be reachableexternalPortRange- port range from which 1 port will be chosen under which the RpcService should be reachable- Returns:
- rpc service builder
-
close
default void close()
Hook to cleanup resources, like common thread pools or classloaders.- Specified by:
closein interfaceAutoCloseable
-
load
static RpcSystem load()
Loads the RpcSystem.- Returns:
- loaded RpcSystem
-
load
static RpcSystem load(org.apache.flink.configuration.Configuration config)
Loads the RpcSystem.- Parameters:
config- Flink configuration- Returns:
- loaded RpcSystem
-
-