public abstract class GrpcClient extends RpcClient
RpcClient.ConnectionEvent, RpcClient.ServerInfoclientEventExecutor, connectionEventListeners, currentConnection, eventLinkedBlockingQueue, resourceLoader, rpcClientConfig, rpcClientStatus, serverRequestHandlers| 构造器和说明 |
|---|
GrpcClient(GrpcClientConfig clientConfig)
constructor.
|
GrpcClient(GrpcClientConfig clientConfig,
ServerListFactory serverListFactory)
constructor.
|
GrpcClient(String name)
constructor.
|
GrpcClient(String name,
Integer threadPoolCoreSize,
Integer threadPoolMaxSize,
Map<String,String> labels)
constructor.
|
GrpcClient(String name,
Integer threadPoolCoreSize,
Integer threadPoolMaxSize,
Map<String,String> labels,
RpcClientTlsConfig tlsConfig) |
| 限定符和类型 | 方法和说明 |
|---|---|
protected abstract AbilityMode |
abilityMode()
ability mode: sdk client or cluster client.
|
protected void |
afterReset(ConnectResetRequest request)
. invoke after receiving reset request
|
Connection |
connectToServer(RpcClient.ServerInfo serverInfo)
connect to server.
|
protected ThreadPoolExecutor |
createGrpcExecutor(String serverIp) |
protected RequestGrpc.RequestFutureStub |
createNewChannelStub(io.grpc.ManagedChannel managedChannelTemp)
Create a stub using a channel.
|
ConnectionType |
getConnectionType()
get connection type of this client.
|
void |
shutdown()
Shutdown the Resources, such as Thread Pool.
|
asyncRequest, currentRpcServer, getConnectionAbility, getCurrentServer, getLabels, getName, getServerListFactory, getTenant, handleServerRequest, init, isRunning, isShutdown, isWaitInitiated, nextRpcServer, notifyConnected, notifyDisConnected, onServerListChange, reconnect, registerConnectionListener, registerServerRequestHandler, request, request, requestFuture, rpcPortOffset, serverListFactory, setTenant, start, switchServerAsync, switchServerAsync, switchServerAsyncOnRequestFailpublic GrpcClient(String name)
name - .public GrpcClient(GrpcClientConfig clientConfig)
clientConfig - .public GrpcClient(GrpcClientConfig clientConfig, ServerListFactory serverListFactory)
clientConfig - .serverListFactory - .public GrpcClient(String name, Integer threadPoolCoreSize, Integer threadPoolMaxSize, Map<String,String> labels)
name - .threadPoolCoreSize - .threadPoolMaxSize - .labels - .public ConnectionType getConnectionType()
RpcClientgetConnectionType 在类中 RpcClientprotected ThreadPoolExecutor createGrpcExecutor(String serverIp)
public void shutdown()
throws NacosException
Closeableshutdown 在接口中 Closeableshutdown 在类中 RpcClientNacosException - exception.protected RequestGrpc.RequestFutureStub createNewChannelStub(io.grpc.ManagedChannel managedChannelTemp)
managedChannelTemp - channel.public Connection connectToServer(RpcClient.ServerInfo serverInfo)
RpcClientconnectToServer 在类中 RpcClientserverInfo - server address to connect.protected abstract AbilityMode abilityMode()
protected void afterReset(ConnectResetRequest request)
RpcClientafterReset 在类中 RpcClientrequest - request for resettingCopyright © 2018–2024 Alibaba Group. All rights reserved.