public class BrpcSingleChannel extends AbstractBrpcChannelGroup
| 限定符和类型 | 类和说明 |
|---|---|
static class |
BrpcSingleChannel.ReConnectTask |
bootstrap, ip, port, protocol| 构造器和说明 |
|---|
BrpcSingleChannel(String ip,
int port,
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, getIp, getPort, getProtocolpublic 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 在接口中 BrpcChannelGroupupdateChannel 在类中 AbstractBrpcChannelGrouppublic 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 在接口中 BrpcChannelGroupgetFailedNum 在类中 AbstractBrpcChannelGrouppublic void incFailedNum()
incFailedNum 在接口中 BrpcChannelGroupincFailedNum 在类中 AbstractBrpcChannelGrouppublic Queue<Integer> getLatencyWindow()
getLatencyWindow 在接口中 BrpcChannelGroupgetLatencyWindow 在类中 AbstractBrpcChannelGrouppublic void updateLatency(int latency)
updateLatency 在接口中 BrpcChannelGroupupdateLatency 在类中 AbstractBrpcChannelGrouppublic void updateLatencyWithReadTimeOut()
Copyright © 2019 Baidu, Inc.. All rights reserved.