public class BrpcPooledChannel extends AbstractBrpcChannel
bootstrap, bootstrapManager, communicationOptions, serviceInstance| Constructor and Description |
|---|
BrpcPooledChannel(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 |
updateLatency(int latency) |
void |
updateLatencyWithReadTimeOut() |
void |
updateMaxConnection(int num) |
connect, equals, getProtocol, getServiceInstance, hashCode, sendClientNameToServer, updateChannelpublic BrpcPooledChannel(ServiceInstance serviceInstance, CommunicationOptions communicationOptions)
public 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()
close in interface BrpcChannelclose in class AbstractBrpcChannelpublic 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 updateMaxConnection(int num)
public int getCurrentMaxConnection()
public int getActiveConnectionNum()
public int getIdleConnectionNum()
public void updateLatencyWithReadTimeOut()
updateLatencyWithReadTimeOut in interface BrpcChannelupdateLatencyWithReadTimeOut in class AbstractBrpcChannelCopyright © 2022 Baidu, Inc.. All rights reserved.