Java Code Examples for io.grpc.LoadBalancer#Subchannel

The following examples show how to use io.grpc.LoadBalancer#Subchannel . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ManagedChannelImpl.java    From grpc-nebula-java with Apache License 2.0 5 votes vote down vote up
@Override
public void updateSubchannelAddresses(
    LoadBalancer.Subchannel subchannel, List<EquivalentAddressGroup> addrs) {
  checkArgument(subchannel instanceof SubchannelImpl,
      "subchannel must have been returned from createSubchannel");
  ((SubchannelImpl) subchannel).subchannel.updateAddresses(addrs);
}
 
Example 2
Source File: AgentClientMock.java    From pinpoint with Apache License 2.0 5 votes vote down vote up
@Override
public void requestConnection() {
    LoadBalancer.Subchannel subchannel = result.getSubchannel();
    if (subchannel != null) {
        subchannel.requestConnection();
    }
}
 
Example 3
Source File: ManagedChannelImpl.java    From grpc-java with Apache License 2.0 5 votes vote down vote up
@Deprecated
@Override
public void updateSubchannelAddresses(
    LoadBalancer.Subchannel subchannel, List<EquivalentAddressGroup> addrs) {
  checkArgument(subchannel instanceof SubchannelImpl,
      "subchannel must have been returned from createSubchannel");
  logWarningIfNotInSyncContext("updateSubchannelAddresses()");
  ((InternalSubchannel) subchannel.getInternalSubchannel()).updateAddresses(addrs);
}