Class PekkoRpcService
- java.lang.Object
-
- org.apache.flink.runtime.rpc.pekko.PekkoRpcService
-
- All Implemented Interfaces:
AutoCloseable,org.apache.flink.runtime.rpc.RpcService,org.apache.flink.util.AutoCloseableAsync
@ThreadSafe public class PekkoRpcService extends Object implements org.apache.flink.runtime.rpc.RpcService
Pekko basedRpcServiceimplementation. The RPC service starts an actor to receive RPC invocations from aRpcGateway.
-
-
Constructor Summary
Constructors Constructor Description PekkoRpcService(org.apache.pekko.actor.ActorSystem actorSystem, PekkoRpcServiceConfiguration configuration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompletableFuture<Void>closeAsync()<F extends Serializable,C extends org.apache.flink.runtime.rpc.FencedRpcGateway<F>>
CompletableFuture<C>connect(String address, F fencingToken, Class<C> clazz)<C extends org.apache.flink.runtime.rpc.RpcGateway>
CompletableFuture<C>connect(String address, Class<C> clazz)org.apache.pekko.actor.ActorSystemgetActorSystem()StringgetAddress()intgetPort()org.apache.flink.util.concurrent.ScheduledExecutorgetScheduledExecutor()<C extends org.apache.flink.runtime.rpc.RpcGateway>
CgetSelfGateway(Class<C> selfGatewayType, org.apache.flink.runtime.rpc.RpcServer rpcServer)protected intgetVersion()<C extends org.apache.flink.runtime.rpc.RpcEndpoint & org.apache.flink.runtime.rpc.RpcGateway>
org.apache.flink.runtime.rpc.RpcServerstartServer(C rpcEndpoint)voidstopServer(org.apache.flink.runtime.rpc.RpcServer selfGateway)
-
-
-
Constructor Detail
-
PekkoRpcService
@VisibleForTesting public PekkoRpcService(org.apache.pekko.actor.ActorSystem actorSystem, PekkoRpcServiceConfiguration configuration)
-
-
Method Detail
-
getActorSystem
public org.apache.pekko.actor.ActorSystem getActorSystem()
-
getVersion
protected int getVersion()
-
getAddress
public String getAddress()
- Specified by:
getAddressin interfaceorg.apache.flink.runtime.rpc.RpcService
-
getPort
public int getPort()
- Specified by:
getPortin interfaceorg.apache.flink.runtime.rpc.RpcService
-
getSelfGateway
public <C extends org.apache.flink.runtime.rpc.RpcGateway> C getSelfGateway(Class<C> selfGatewayType, org.apache.flink.runtime.rpc.RpcServer rpcServer)
- Specified by:
getSelfGatewayin interfaceorg.apache.flink.runtime.rpc.RpcService
-
connect
public <C extends org.apache.flink.runtime.rpc.RpcGateway> CompletableFuture<C> connect(String address, Class<C> clazz)
- Specified by:
connectin interfaceorg.apache.flink.runtime.rpc.RpcService
-
connect
public <F extends Serializable,C extends org.apache.flink.runtime.rpc.FencedRpcGateway<F>> CompletableFuture<C> connect(String address, F fencingToken, Class<C> clazz)
- Specified by:
connectin interfaceorg.apache.flink.runtime.rpc.RpcService
-
startServer
public <C extends org.apache.flink.runtime.rpc.RpcEndpoint & org.apache.flink.runtime.rpc.RpcGateway> org.apache.flink.runtime.rpc.RpcServer startServer(C rpcEndpoint)
- Specified by:
startServerin interfaceorg.apache.flink.runtime.rpc.RpcService
-
stopServer
public void stopServer(org.apache.flink.runtime.rpc.RpcServer selfGateway)
- Specified by:
stopServerin interfaceorg.apache.flink.runtime.rpc.RpcService
-
closeAsync
public CompletableFuture<Void> closeAsync()
- Specified by:
closeAsyncin interfaceorg.apache.flink.util.AutoCloseableAsync
-
getScheduledExecutor
public org.apache.flink.util.concurrent.ScheduledExecutor getScheduledExecutor()
- Specified by:
getScheduledExecutorin interfaceorg.apache.flink.runtime.rpc.RpcService
-
-