public abstract class AbstractBrpcChannel extends Object implements BrpcChannel
| 限定符和类型 | 字段和说明 |
|---|---|
protected io.netty.bootstrap.Bootstrap |
bootstrap |
protected Protocol |
protocol |
protected RpcClient |
rpcClient |
protected ServiceInstance |
serviceInstance |
| 构造器和说明 |
|---|
AbstractBrpcChannel(ServiceInstance serviceInstance,
io.netty.bootstrap.Bootstrap bootstrap,
Protocol protocol,
RpcClient rpcClient) |
| 限定符和类型 | 方法和说明 |
|---|---|
io.netty.channel.Channel |
connect(String ip,
int port) |
boolean |
equals(Object object) |
long |
getFailedNum() |
Queue<Integer> |
getLatencyWindow() |
Protocol |
getProtocol() |
ServiceInstance |
getServiceInstance() |
int |
hashCode() |
void |
incFailedNum() |
void |
sendClientNameToServer(io.netty.channel.ChannelFuture channelFuture) |
void |
updateChannel(io.netty.channel.Channel channel) |
void |
updateLatency(int latency) |
void |
updateLatencyWithReadTimeOut() |
close, getActiveConnectionNum, getChannel, getCurrentMaxConnection, getIdleConnectionNum, removeChannel, returnChannel, updateMaxConnectionprotected ServiceInstance serviceInstance
protected io.netty.bootstrap.Bootstrap bootstrap
protected Protocol protocol
protected RpcClient rpcClient
public AbstractBrpcChannel(ServiceInstance serviceInstance, io.netty.bootstrap.Bootstrap bootstrap, Protocol protocol, RpcClient rpcClient)
public void updateChannel(io.netty.channel.Channel channel)
updateChannel 在接口中 BrpcChannelpublic void sendClientNameToServer(io.netty.channel.ChannelFuture channelFuture)
public io.netty.channel.Channel connect(String ip, int port)
connect 在接口中 BrpcChannelpublic ServiceInstance getServiceInstance()
getServiceInstance 在接口中 BrpcChannelpublic long getFailedNum()
getFailedNum 在接口中 BrpcChannelpublic void incFailedNum()
incFailedNum 在接口中 BrpcChannelpublic Queue<Integer> getLatencyWindow()
getLatencyWindow 在接口中 BrpcChannelpublic void updateLatency(int latency)
updateLatency 在接口中 BrpcChannelpublic void updateLatencyWithReadTimeOut()
updateLatencyWithReadTimeOut 在接口中 BrpcChannelpublic Protocol getProtocol()
getProtocol 在接口中 BrpcChannelpublic int hashCode()
hashCode 在接口中 BrpcChannelhashCode 在类中 Objectpublic boolean equals(Object object)
equals 在接口中 BrpcChannelequals 在类中 ObjectCopyright © 2019 Baidu, Inc.. All rights reserved.