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 based RpcService implementation. The RPC service starts an actor to receive RPC invocations from a RpcGateway.
  • Constructor Details

    • PekkoRpcService

      @VisibleForTesting public PekkoRpcService(org.apache.pekko.actor.ActorSystem actorSystem, PekkoRpcServiceConfiguration configuration)
  • Method Details

    • getActorSystem

      public org.apache.pekko.actor.ActorSystem getActorSystem()
    • getVersion

      protected int getVersion()
    • getAddress

      public String getAddress()
      Specified by:
      getAddress in interface org.apache.flink.runtime.rpc.RpcService
    • getPort

      public int getPort()
      Specified by:
      getPort in interface org.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:
      getSelfGateway in interface org.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:
      connect in interface org.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:
      connect in interface org.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, Map<String,String> loggingContext)
      Specified by:
      startServer in interface org.apache.flink.runtime.rpc.RpcService
    • stopServer

      public void stopServer(org.apache.flink.runtime.rpc.RpcServer selfGateway)
      Specified by:
      stopServer in interface org.apache.flink.runtime.rpc.RpcService
    • closeAsync

      public CompletableFuture<Void> closeAsync()
      Specified by:
      closeAsync in interface org.apache.flink.util.AutoCloseableAsync
    • getScheduledExecutor

      public org.apache.flink.util.concurrent.ScheduledExecutor getScheduledExecutor()
      Specified by:
      getScheduledExecutor in interface org.apache.flink.runtime.rpc.RpcService