@Test public void resetConnectBackoff_noOpWhenNameResolverNotStarted() { FakeNameResolverFactory nameResolverFactory = new FakeNameResolverFactory.Builder(expectedUri).build(); channelBuilder.nameResolverFactory(nameResolverFactory); requestConnection = false; createChannel(); channel.resetConnectBackoff(); FakeNameResolverFactory.FakeNameResolver nameResolver = nameResolverFactory.resolvers.get(0); assertEquals(0, nameResolver.refreshCalled); }
@Override public void resetConnectBackoff() { final class ResetConnectBackoff implements Runnable { @Override public void run() { if (shutdown.get()) { return; } if (nameResolverRefreshFuture != null) { checkState(nameResolverStarted, "name resolver must be started"); cancelNameResolverBackoff(); nameResolver.refresh(); } for (InternalSubchannel subchannel : subchannels) { subchannel.resetConnectBackoff(); } for (OobChannel oobChannel : oobChannels) { oobChannel.resetConnectBackoff(); } } } syncContext.execute(new ResetConnectBackoff()); }
ManagedChannelImpl extends ManagedChannel implements
    InternalInstrumented<ChannelStats> { @Override public void resetConnectBackoff() { final class ResetConnectBackoff implements Runnable { @Override public void run() { if (shutdown.get()) { return; } if (nameResolverRefreshFuture != null) { checkState(nameResolverStarted, "name resolver must be started"); cancelNameResolverBackoff(); nameResolver.refresh(); } for (InternalSubchannel subchannel : subchannels) { subchannel.resetConnectBackoff(); } for (OobChannel oobChannel : oobChannels) { oobChannel.resetConnectBackoff(); } } } syncContext.execute(new ResetConnectBackoff()); } }
ManagedChannelImpl extends ManagedChannel implements
    InternalInstrumented<ChannelStats> { @Override public void resetConnectBackoff() { final class ResetConnectBackoff implements Runnable { @Override public void run() { if (shutdown.get()) { return; } if (nameResolverRefreshFuture != null) { checkState(nameResolverStarted, "name resolver must be started"); cancelNameResolverBackoff(); nameResolver.refresh(); } for (InternalSubchannel subchannel : subchannels) { subchannel.resetConnectBackoff(); } for (OobChannel oobChannel : oobChannels) { oobChannel.resetConnectBackoff(); } } } syncContext.execute(new ResetConnectBackoff()); } ManagedChannelImpl(
      AbstractManagedChannelImplBuilder<?> builder,
      ClientTransportFactory clientTransportFactory,
      BackoffPolicy.Provider backoffPolicyProvider,
      ObjectPool<? extends Executor> balancerRpcExecutorPool,
      Supplier<Stopwatch> stopwatchSupplier,
      List<ClientInterceptor> interceptors,
      final TimeProvider timeProvider); }
ManagedChannelImpl extends ManagedChannel implements
    InternalInstrumented<ChannelStats> { @Override public void resetConnectBackoff() { final class ResetConnectBackoff implements Runnable { @Override public void run() { if (shutdown.get()) { return; } if (nameResolverRefreshFuture != null) { checkState(nameResolverStarted, "name resolver must be started"); cancelNameResolverBackoff(); nameResolver.refresh(); } for (InternalSubchannel subchannel : subchannels) { subchannel.resetConnectBackoff(); } for (OobChannel oobChannel : oobChannels) { oobChannel.resetConnectBackoff(); } } } syncContext.execute(new ResetConnectBackoff()); } ManagedChannelImpl(
      AbstractManagedChannelImplBuilder<?> builder,
      ClientTransportFactory clientTransportFactory,
      BackoffPolicy.Provider backoffPolicyProvider,
      ObjectPool<? extends Executor> balancerRpcExecutorPool,
      Supplier<Stopwatch> stopwatchSupplier,
      List<ClientInterceptor> interceptors,
      final TimeProvider timeProvider); @Override ListenableFuture<ChannelStats> getStats(); @Override InternalLogId getLogId(); @Override ManagedChannelImpl shutdown(); @Override ManagedChannelImpl shutdownNow(); @Override boolean isShutdown(); @Override boolean awaitTermination(long timeout, TimeUnit unit); @Override boolean isTerminated(); @Override ClientCall<ReqT, RespT> newCall(MethodDescriptor<ReqT, RespT> method,
      CallOptions callOptions); @Override String authority(); @Override ConnectivityState getState(boolean requestConnection); @Override void notifyWhenStateChanged(final ConnectivityState source, final Runnable callback); @Override void resetConnectBackoff(); @Override void enterIdle(); @Override String toString(); @Override Map<String, String> getLoadBalanceModeMap(); @Override void setLoadBalanceModeMap(Map<String, String> map); @Override NameResolver getNameResolver(); @Override LoadBalancer getLoadBalancer(); }
ManagedChannelImpl extends ManagedChannel implements
    InternalInstrumented<ChannelStats> { @Override public void resetConnectBackoff() { final class ResetConnectBackoff implements Runnable { @Override public void run() { if (shutdown.get()) { return; } if (nameResolverRefreshFuture != null) { checkState(nameResolverStarted, "name resolver must be started"); cancelNameResolverBackoff(); nameResolver.refresh(); } for (InternalSubchannel subchannel : subchannels) { subchannel.resetConnectBackoff(); } for (OobChannel oobChannel : oobChannels) { oobChannel.resetConnectBackoff(); } } } syncContext.execute(new ResetConnectBackoff()); } ManagedChannelImpl(
      AbstractManagedChannelImplBuilder<?> builder,
      ClientTransportFactory clientTransportFactory,
      BackoffPolicy.Provider backoffPolicyProvider,
      ObjectPool<? extends Executor> balancerRpcExecutorPool,
      Supplier<Stopwatch> stopwatchSupplier,
      List<ClientInterceptor> interceptors,
      final TimeProvider timeProvider); @Override ListenableFuture<ChannelStats> getStats(); @Override InternalLogId getLogId(); @Override ManagedChannelImpl shutdown(); @Override ManagedChannelImpl shutdownNow(); @Override boolean isShutdown(); @Override boolean awaitTermination(long timeout, TimeUnit unit); @Override boolean isTerminated(); @Override ClientCall<ReqT, RespT> newCall(MethodDescriptor<ReqT, RespT> method,
      CallOptions callOptions); @Override String authority(); @Override ConnectivityState getState(boolean requestConnection); @Override void notifyWhenStateChanged(final ConnectivityState source, final Runnable callback); @Override void resetConnectBackoff(); @Override void enterIdle(); @Override String toString(); @Override Map<String, String> getLoadBalanceModeMap(); @Override void setLoadBalanceModeMap(Map<String, String> map); @Override NameResolver getNameResolver(); @Override LoadBalancer getLoadBalancer();  }