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