public class BrpcPooledChannel extends AbstractBrpcChannelGroup
bootstrap, ip, port, protocol| 构造器和说明 |
|---|
BrpcPooledChannel(String ip,
int port,
RpcClient rpcClient) |
| 限定符和类型 | 方法和说明 |
|---|---|
void |
close() |
boolean |
equals(Object obj) |
int |
getActiveConnectionNum() |
io.netty.channel.Channel |
getChannel() |
int |
getCurrentMaxConnection() |
long |
getFailedNum() |
int |
getIdleConnectionNum() |
Queue<Integer> |
getLatencyWindow() |
int |
hashCode() |
void |
incFailedNum() |
void |
removeChannel(io.netty.channel.Channel channel) |
void |
returnChannel(io.netty.channel.Channel channel) |
void |
updateLatency(int latency) |
void |
updateLatencyWithReadTimeOut() |
void |
updateMaxConnection(int num) |
connect, getIp, getPort, getProtocol, updateChannelpublic 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 在接口中 BrpcChannelGroupgetFailedNum 在类中 AbstractBrpcChannelGrouppublic void incFailedNum()
incFailedNum 在接口中 BrpcChannelGroupincFailedNum 在类中 AbstractBrpcChannelGrouppublic Queue<Integer> getLatencyWindow()
getLatencyWindow 在接口中 BrpcChannelGroupgetLatencyWindow 在类中 AbstractBrpcChannelGrouppublic void updateLatency(int latency)
updateLatency 在接口中 BrpcChannelGroupupdateLatency 在类中 AbstractBrpcChannelGrouppublic void updateMaxConnection(int num)
public int getCurrentMaxConnection()
public int getActiveConnectionNum()
public int getIdleConnectionNum()
public void updateLatencyWithReadTimeOut()
Copyright © 2019 Baidu, Inc.. All rights reserved.