public class BrpcSingleChannel extends AbstractBrpcChannel
| Modifier and Type | Class and Description |
|---|---|
static class |
BrpcSingleChannel.ReConnectTask |
bootstrap, bootstrapManager, communicationOptions, serviceInstance| Constructor and Description |
|---|
BrpcSingleChannel(ServiceInstance serviceInstance,
CommunicationOptions communicationOptions) |
| Modifier and Type | Method and Description |
|---|---|
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, CommunicationOptions communicationOptions)
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 in interface BrpcChannelupdateChannel in class AbstractBrpcChannelpublic void close()
close in interface BrpcChannelclose in class AbstractBrpcChannelpublic 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 in interface BrpcChannelgetFailedNum in class AbstractBrpcChannelpublic void incFailedNum()
incFailedNum in interface BrpcChannelincFailedNum in class AbstractBrpcChannelpublic Queue<Integer> getLatencyWindow()
getLatencyWindow in interface BrpcChannelgetLatencyWindow in class AbstractBrpcChannelpublic void updateLatency(int latency)
updateLatency in interface BrpcChannelupdateLatency in class AbstractBrpcChannelpublic void updateLatencyWithReadTimeOut()
updateLatencyWithReadTimeOut in interface BrpcChannelupdateLatencyWithReadTimeOut in class AbstractBrpcChannelCopyright © 2020 Baidu, Inc.. All rights reserved.