Skip to content

Commit 00e0b1a

Browse files
authoredOct 23, 2024··
docs: Add missing javadoc comments to public methods. (#2080)
The checkstyle rules are becoming more strict. All public methods must now have javadoc.
1 parent 5db195b commit 00e0b1a

File tree

5 files changed

+26
-0
lines changed

5 files changed

+26
-0
lines changed
 

‎core/src/main/java/com/google/cloud/sql/ConnectorConfig.java

+10
Original file line numberDiff line numberDiff line change
@@ -153,52 +153,62 @@ public static class Builder {
153153
private String universeDomain;
154154
private RefreshStrategy refreshStrategy = RefreshStrategy.BACKGROUND;
155155

156+
/** Chained setter for TargetPrinciple field. */
156157
public Builder withTargetPrincipal(String targetPrincipal) {
157158
this.targetPrincipal = targetPrincipal;
158159
return this;
159160
}
160161

162+
/** Chained setter for GoogleCredentialsSupplier field. */
161163
public Builder withGoogleCredentialsSupplier(
162164
Supplier<GoogleCredentials> googleCredentialsSupplier) {
163165
this.googleCredentialsSupplier = googleCredentialsSupplier;
164166
return this;
165167
}
166168

169+
/** Chained setter for GoogleCredentials field. */
167170
public Builder withGoogleCredentials(GoogleCredentials googleCredentials) {
168171
this.googleCredentials = googleCredentials;
169172
return this;
170173
}
171174

175+
/** Chained setter for GoogleCredentialsPath field. */
172176
public Builder withGoogleCredentialsPath(String googleCredentialsPath) {
173177
this.googleCredentialsPath = googleCredentialsPath;
174178
return this;
175179
}
176180

181+
/** Chained setter for Delegates field. */
177182
public Builder withDelegates(List<String> delegates) {
178183
this.delegates = delegates;
179184
return this;
180185
}
181186

187+
/** Chained setter for AdminRootUrl field. */
182188
public Builder withAdminRootUrl(String adminRootUrl) {
183189
this.adminRootUrl = adminRootUrl;
184190
return this;
185191
}
186192

193+
/** Chained setter for AdminServicePath field. */
187194
public Builder withAdminServicePath(String adminServicePath) {
188195
this.adminServicePath = adminServicePath;
189196
return this;
190197
}
191198

199+
/** Chained setter for AdminQuotaProject field. */
192200
public Builder withAdminQuotaProject(String adminQuotaProject) {
193201
this.adminQuotaProject = adminQuotaProject;
194202
return this;
195203
}
196204

205+
/** Chained setter for UniverseDomain field. */
197206
public Builder withUniverseDomain(String universeDomain) {
198207
this.universeDomain = universeDomain;
199208
return this;
200209
}
201210

211+
/** Chained setter for RefreshStrategy field. */
202212
public Builder withRefreshStrategy(RefreshStrategy refreshStrategy) {
203213
this.refreshStrategy = refreshStrategy;
204214
return this;

‎core/src/main/java/com/google/cloud/sql/CredentialFactory.java

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ public interface CredentialFactory {
3232
/** Name of system property that can specify an alternative credential factory. */
3333
String CREDENTIAL_FACTORY_PROPERTY = "cloudSql.socketFactory.credentialFactory";
3434

35+
/** Creates the HttpRequestInitializer. */
3536
HttpRequestInitializer create();
3637

3738
/**

‎core/src/main/java/com/google/cloud/sql/RefreshStrategy.java

+2
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@
1818

1919
/** Enum for supported refresh strategies. */
2020
public enum RefreshStrategy {
21+
/** Use the Background refresh strategy. */
2122
BACKGROUND,
23+
/** Use the Lazy refresh strategy. */
2224
LAZY
2325
}

‎core/src/main/java/com/google/cloud/sql/core/ConnectionConfig.java

+6
Original file line numberDiff line numberDiff line change
@@ -239,26 +239,31 @@ public static class Builder {
239239
private ConnectorConfig connectorConfig = new ConnectorConfig.Builder().build();
240240
private AuthType authType = DEFAULT_AUTH_TYPE;
241241

242+
/** Chained setter for CloudSqlInstance field. */
242243
public Builder withCloudSqlInstance(String cloudSqlInstance) {
243244
this.cloudSqlInstance = cloudSqlInstance;
244245
return this;
245246
}
246247

248+
/** Chained setter for NamedConnector field. */
247249
public Builder withNamedConnector(String namedConnector) {
248250
this.namedConnector = namedConnector;
249251
return this;
250252
}
251253

254+
/** Chained setter for ConnectorConfig field. */
252255
public Builder withConnectorConfig(ConnectorConfig connectorConfig) {
253256
this.connectorConfig = connectorConfig;
254257
return this;
255258
}
256259

260+
/** Chained setter for UnixSocketPath field. */
257261
public Builder withUnixSocketPath(String unixSocketPath) {
258262
this.unixSocketPath = unixSocketPath;
259263
return this;
260264
}
261265

266+
/** Chained setter for AuthType field. */
262267
public Builder withAuthType(AuthType authType) {
263268
this.authType = authType;
264269
return this;
@@ -276,6 +281,7 @@ public Builder withIpTypes(List<IpType> ipTypes) {
276281
return this;
277282
}
278283

284+
/** Chained setter for UnixSocketPathSuffix field. */
279285
public Builder withUnixSocketPathSuffix(String unixSocketPathSuffix) {
280286
this.unixSocketPathSuffix = unixSocketPathSuffix;
281287
return this;

‎core/src/main/java/com/google/cloud/sql/core/RefreshStrategy.java

+7
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,18 @@
1818

1919
/** Provide the refresh strategy to the DefaultConnectionInfoCache. */
2020
public interface RefreshStrategy {
21+
/** Return the current valid ConnectionInfo, blocking if necessary for up to the timeout. */
2122
ConnectionInfo getConnectionInfo(long timeoutMs);
2223

24+
/** Force a refresh of the ConnectionInfo, possibly in the background. */
2325
void forceRefresh();
2426

27+
/** Refresh the ConnectionInfo if it has expired or is near expiration. */
2528
void refreshIfExpired();
2629

30+
/**
31+
* Stop background threads and refresh operations in progress and refuse to start subsequent
32+
* refresh operations.
33+
*/
2734
void close();
2835
}

0 commit comments

Comments
 (0)
Please sign in to comment.