java.lang.Object
com.alibaba.nacos.common.remote.client.RpcClient
com.alibaba.nacos.common.remote.client.grpc.GrpcClient
所有已实现的接口:
Closeable
直接已知子类:
GrpcClusterClient, GrpcSdkClient

public abstract class GrpcClient extends RpcClient
gRPC Client.
版本:
$Id: GrpcClient.java, v 0.1 2020年07月13日 9:16 PM liuzunfei Exp $
作者:
liuzunfei
  • 构造器详细资料

  • 方法详细资料

    • getConnectionType

      public ConnectionType getConnectionType()
      从类复制的说明: RpcClient
      get connection type of this client.
      指定者:
      getConnectionType 在类中 RpcClient
      返回:
      ConnectionType.
    • createGrpcExecutor

      protected ThreadPoolExecutor createGrpcExecutor(String serverIp)
    • shutdown

      public void shutdown() throws com.alibaba.nacos.api.exception.NacosException
      从接口复制的说明: Closeable
      Shutdown the Resources, such as Thread Pool.
      指定者:
      shutdown 在接口中 Closeable
      覆盖:
      shutdown 在类中 RpcClient
      抛出:
      com.alibaba.nacos.api.exception.NacosException - exception.
    • createNewChannelStub

      protected com.alibaba.nacos.api.grpc.auto.RequestGrpc.RequestFutureStub createNewChannelStub(io.grpc.ManagedChannel managedChannelTemp)
      Create a stub using a channel.
      参数:
      managedChannelTemp - channel.
      返回:
      if server check success,return a non-null stub.
    • connectToServer

      public Connection connectToServer(RpcClient.ServerInfo serverInfo)
      从类复制的说明: RpcClient
      connect to server.
      指定者:
      connectToServer 在类中 RpcClient
      参数:
      serverInfo - server address to connect.
      返回:
      return connection when successfully connect to server, or null if failed.
    • getClientVersion

      protected String getClientVersion()
    • abilityMode

      protected abstract com.alibaba.nacos.api.ability.constant.AbilityMode abilityMode()
      ability mode: sdk client or cluster client.
      返回:
      mode
    • afterReset

      protected void afterReset(com.alibaba.nacos.api.remote.request.ConnectResetRequest request)
      从类复制的说明: RpcClient
      . invoke after receiving reset request
      覆盖:
      afterReset 在类中 RpcClient
      参数:
      request - request for resetting