Package org.apache.flink.runtime.rpc
Interface RpcSystem
-
- All Superinterfaces:
AutoCloseable
,RpcSystemUtils
- All Known Implementing Classes:
CleanupOnCloseRpcSystem
,PekkoRpcSystem
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 class
RpcSystem.FixedThreadPoolExecutorConfiguration
Descriptor for creating a thread-pool with a fixed number of threads.static class
RpcSystem.ForkJoinExecutorConfiguration
Descriptor for creating a fork-join thread-pool.static interface
RpcSystem.RpcServiceBuilder
Builder forRpcService
.
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default void
close()
Hook to cleanup resources, like common thread pools or classloaders.static RpcSystem
load()
Loads the RpcSystem.static RpcSystem
load(Configuration config)
Loads the RpcSystem.RpcSystem.RpcServiceBuilder
localServiceBuilder(Configuration configuration)
Returns a builder for anRpcService
that is only reachable from the local machine.RpcSystem.RpcServiceBuilder
remoteServiceBuilder(Configuration configuration, String externalAddress, String externalPortRange)
Returns a builder for anRpcService
that is reachable from other machines.-
Methods inherited from interface org.apache.flink.runtime.rpc.RpcSystemUtils
getInetSocketAddressFromRpcUrl, getMaximumMessageSizeInBytes, getRpcUrl
-
-
-
-
Method Detail
-
localServiceBuilder
RpcSystem.RpcServiceBuilder localServiceBuilder(Configuration configuration)
Returns a builder for anRpcService
that is only reachable from the local machine.- Parameters:
configuration
- Flink configuration- Returns:
- rpc service builder
-
remoteServiceBuilder
RpcSystem.RpcServiceBuilder remoteServiceBuilder(Configuration configuration, @Nullable String externalAddress, String externalPortRange)
Returns a builder for anRpcService
that 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:
close
in interfaceAutoCloseable
-
load
static RpcSystem load()
Loads the RpcSystem.- Returns:
- loaded RpcSystem
-
load
static RpcSystem load(Configuration config)
Loads the RpcSystem.- Parameters:
config
- Flink configuration- Returns:
- loaded RpcSystem
-
-