public class BrpcPooledChannel extends AbstractBrpcChannel
bootstrap, protocol, rpcClient, serviceInstance| 构造器和说明 |
|---|
BrpcPooledChannel(ServiceInstance serviceInstance,
RpcClient rpcClient) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
int |
getActiveConnectionNum() |
io.netty.channel.Channel |
getChannel() |
int |
getCurrentMaxConnection() |
long |
getFailedNum() |
int |
getIdleConnectionNum() |
Queue<Integer> |
getLatencyWindow() |
RpcClient |
getRpcClient() |
void |
incFailedNum() |
void |
removeChannel(io.netty.channel.Channel channel) |
void |
returnChannel(io.netty.channel.Channel channel) |
void |
setRpcClient(RpcClient rpcClient) |
void |
updateLatency(int latency) |
void |
updateLatencyWithReadTimeOut() |
void |
updateMaxConnection(int num) |
connect, equals, getProtocol, getServiceInstance, hashCode, sendClientNameToServer, updateChannelpublic BrpcPooledChannel(ServiceInstance serviceInstance, RpcClient rpcClient)
public io.netty.channel.Channel getChannel()
throws Exception,
NoSuchElementException,
IllegalStateException
public void returnChannel(io.netty.channel.Channel channel)
public void removeChannel(io.netty.channel.Channel channel)
public void close()
public long getFailedNum()
getFailedNum 在接口中 BrpcChannelgetFailedNum 在类中 AbstractBrpcChannelpublic void incFailedNum()
incFailedNum 在接口中 BrpcChannelincFailedNum 在类中 AbstractBrpcChannelpublic Queue<Integer> getLatencyWindow()
getLatencyWindow 在接口中 BrpcChannelgetLatencyWindow 在类中 AbstractBrpcChannelpublic void updateLatency(int latency)
updateLatency 在接口中 BrpcChannelupdateLatency 在类中 AbstractBrpcChannelpublic void updateMaxConnection(int num)
public int getCurrentMaxConnection()
public int getActiveConnectionNum()
public int getIdleConnectionNum()
public void updateLatencyWithReadTimeOut()
public RpcClient getRpcClient()
public void setRpcClient(RpcClient rpcClient)
Copyright © 2019 Baidu, Inc.. All rights reserved.