@Nullable
        private Object maybeUpdate(String hostname, CacheEntry entry) {
            if (resolverClosed) {
                return null;
            }
            refreshing = false;

            final Throwable cause = entry.cause();
            if (cause != null) {
                assert autoRefreshBackoff != null;
                final long nextDelayMillis = autoRefreshBackoff.nextDelayMillis(numAttemptsSoFar++);

                if (nextDelayMillis < 0) {
                    addressResolverCache.invalidate(hostname);
                } else {
                    final ScheduledFuture<?> retryFuture = this.retryFuture;
                    if (retryFuture != null) {
                        retryFuture.cancel(false);
                    }
                    this.retryFuture = executor.schedule(() -> {
                        if (refreshable()) {
                            refresh();
                        } else {
                            addressResolverCache.invalidate(hostname);
                        }
                    }, nextDelayMillis, MILLISECONDS);
                }
                return null;
            }

            // Got the response successfully so reset the state.
            numAttemptsSoFar = 1;
            addressResolverCache.put(hostname, entry);
            return null;
        }
Closes all the resources allocated and used by this resolver.

<p>Please note that this method does not clear the {@link CacheEntry} because the
{@link #addressResolverCache} is created by {@link RefreshingAddressResolverGroup} and shared across
from all {@link RefreshingAddressResolver}s. {@link CacheEntry} is cleared when
{@link RefreshingAddressResolverGroup#close()} is called.
core/src/main/java/com/linecorp/armeria/client/RefreshingAddressResolver.java