in core/src/main/java/com/google/cloud/sql/core/RefreshAheadStrategy.java [298:317]
public void close() {
synchronized (connectionInfoGuard) {
if (closed) {
return;
}
// Cancel any in-progress requests
if (!this.current.isDone()) {
this.current.cancel(true);
}
if (!this.next.isDone()) {
this.next.cancel(true);
}
this.current =
Futures.immediateFailedFuture(new RuntimeException("Named connection is closed."));
this.closed = true;
}
}