public abstract class AbstractBrpcChannel extends Object implements BrpcChannel
| Modifier and Type | Field and Description |
|---|---|
protected io.netty.bootstrap.Bootstrap |
bootstrap |
protected BootstrapManager |
bootstrapManager |
protected CommunicationOptions |
communicationOptions |
protected ServiceInstance |
serviceInstance |
| Constructor and Description |
|---|
AbstractBrpcChannel(ServiceInstance serviceInstance,
CommunicationOptions communicationOptions) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
io.netty.channel.Channel |
connect() |
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() |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitgetActiveConnectionNum, getChannel, getCurrentMaxConnection, getIdleConnectionNum, removeChannel, returnChannel, updateMaxConnectionprotected ServiceInstance serviceInstance
protected CommunicationOptions communicationOptions
protected io.netty.bootstrap.Bootstrap bootstrap
protected BootstrapManager bootstrapManager
public AbstractBrpcChannel(ServiceInstance serviceInstance, CommunicationOptions communicationOptions)
public void updateChannel(io.netty.channel.Channel channel)
updateChannel in interface BrpcChannelpublic void sendClientNameToServer(io.netty.channel.ChannelFuture channelFuture)
public io.netty.channel.Channel connect()
connect in interface BrpcChannelpublic ServiceInstance getServiceInstance()
getServiceInstance in interface BrpcChannelpublic long getFailedNum()
getFailedNum in interface BrpcChannelpublic void incFailedNum()
incFailedNum in interface BrpcChannelpublic Queue<Integer> getLatencyWindow()
getLatencyWindow in interface BrpcChannelpublic void updateLatency(int latency)
updateLatency in interface BrpcChannelpublic void updateLatencyWithReadTimeOut()
updateLatencyWithReadTimeOut in interface BrpcChannelpublic Protocol getProtocol()
getProtocol in interface BrpcChannelpublic void close()
close in interface BrpcChannelCopyright © 2022 Baidu, Inc.. All rights reserved.