diff --git a/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPool.java b/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPool.java index 7f045cc44d..df3888dfc9 100644 --- a/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPool.java +++ b/gax-java/gax-grpc/src/main/java/com/google/api/gax/grpc/ChannelPool.java @@ -152,6 +152,8 @@ Channel getChannel(int affinity) { /** {@inheritDoc} */ @Override public ManagedChannel shutdown() { + LOG.fine("Initiating graceful shutdown due to explicit request"); + List localEntries = entries.get(); for (Entry entry : localEntries) { entry.channel.shutdown(); @@ -191,6 +193,8 @@ public boolean isTerminated() { /** {@inheritDoc} */ @Override public ManagedChannel shutdownNow() { + LOG.fine("Initiating immediate shutdown due to explicit request"); + List localEntries = entries.get(); for (Entry entry : localEntries) { entry.channel.shutdownNow(); @@ -356,6 +360,7 @@ void refresh() { // - then thread2 will shut down channel that thread1 will put back into circulation (after it // replaces the list) synchronized (entryWriteLock) { + LOG.fine("Refreshing all channels"); ArrayList newEntries = new ArrayList<>(entries.get()); for (int i = 0; i < newEntries.size(); i++) {