in core/src/main/java/com/google/cloud/sql/core/LazyRefreshStrategy.java [51:76]
public ConnectionInfo getConnectionInfo(long timeoutMs) {
synchronized (connectionInfoGuard) {
if (closed) {
throw new IllegalStateException(
String.format("[%s] Lazy Refresh: Named connection closed.", name));
}
if (connectionInfo == null) {
logger.debug(
String.format(
"[%s] Lazy Refresh Operation: No client certificate. Starting next refresh "
+ "operation immediately.",
name));
fetchConnectionInfo();
}
if (Instant.now().isAfter(connectionInfo.getExpiration().minus(refreshBuffer))) {
logger.debug(
String.format(
"[%s] Lazy Refresh Operation: Client certificate has expired. Starting next "
+ "refresh operation immediately.",
name));
fetchConnectionInfo();
}
return connectionInfo;
}
}