Skip to content

Commit f4fb2b5

Browse files
authored
javadoc improvement (#1368)
1 parent 6056443 commit f4fb2b5

File tree

11 files changed

+19
-2
lines changed

11 files changed

+19
-2
lines changed

benchmarks/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ dependencies {
2424
implementation("com.mysql:mysql-connector-j:9.2.0")
2525
implementation("org.mariadb.jdbc:mariadb-java-client:3.5.3")
2626
implementation("com.zaxxer:HikariCP:4.0.3")
27+
implementation("org.checkerframework:checker-qual:3.49.2")
2728

2829
testImplementation("org.junit.jupiter:junit-jupiter-api:5.12.1")
2930
testImplementation("org.mockito:mockito-inline:4.11.0") // 4.11.0 is the last version compatible with Java 8

wrapper/src/main/java/software/amazon/jdbc/PropertyDefinition.java

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,8 +190,7 @@ public class PropertyDefinition {
190190
* The usage of the method should be restricted. In most cases the {@link #byName(String)} method should be used
191191
* since the driver internally treats all properties in case-sensitive manner.
192192
*
193-
* <p/>
194-
* For the moment only {@link software.amazon.jdbc.util.ConnectionUrlParser} uses this method.
193+
* <p></p>For the moment only {@link software.amazon.jdbc.util.ConnectionUrlParser} uses this method.
195194
*/
196195
public static @Nullable AwsWrapperProperty byNameIgnoreCase(final String name) {
197196
return PROPS_BY_NAME_LOWERCASE.get(name.toLowerCase());

wrapper/src/main/java/software/amazon/jdbc/plugin/customendpoint/CustomEndpointMonitorImpl.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ public class CustomEndpointMonitorImpl implements CustomEndpointMonitor {
7878
* @param pluginService The plugin service to use to update the set of allowed/blocked hosts according to
7979
* the custom endpoint info.
8080
* @param customEndpointHostSpec The host information for the custom endpoint to be monitored.
81+
* @param endpointIdentifier An endpoint identifier.
8182
* @param region The region of the custom endpoint to be monitored.
8283
* @param refreshRateNano Controls how often the custom endpoint information should be fetched and analyzed for
8384
* changes. The value specified should be in nanoseconds.

wrapper/src/main/java/software/amazon/jdbc/plugin/customendpoint/CustomEndpointPlugin.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ public Connection connect(
207207
* Creates a monitor for the custom endpoint if it does not already exist.
208208
*
209209
* @param props The connection properties.
210+
* @return {@link CustomEndpointMonitor}
210211
*/
211212
protected CustomEndpointMonitor createMonitorIfAbsent(Properties props) {
212213
return monitors.computeIfAbsent(
@@ -229,6 +230,8 @@ protected CustomEndpointMonitor createMonitorIfAbsent(Properties props) {
229230
* If custom endpoint info does not exist for the current custom endpoint, waits a short time for the info to be
230231
* made available by the custom endpoint monitor. This is necessary so that other plugins can rely on accurate custom
231232
* endpoint info. Since custom endpoint monitors and information are shared, we should not have to wait often.
233+
*
234+
* @param monitor A {@link CustomEndpointMonitor} monitor.
232235
*/
233236
protected void waitForCustomEndpointInfo(CustomEndpointMonitor monitor) throws SQLException {
234237
boolean hasCustomEndpointInfo = monitor.hasCustomEndpointInfo();

wrapper/src/main/java/software/amazon/jdbc/plugin/efm/MonitorConnectionContext.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ public class MonitorConnectionContext {
6262
* @param failureDetectionIntervalMillis Interval between each failed connection check.
6363
* @param failureDetectionCount Number of failed connection checks before considering database
6464
* node as unhealthy.
65+
* @param abortedConnectionsCounter Aborted connection telemetry counter.
6566
*/
6667
public MonitorConnectionContext(
6768
final Monitor monitor,

wrapper/src/main/java/software/amazon/jdbc/plugin/efm/MonitorImpl.java

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -368,6 +368,8 @@ public boolean isStopped() {
368368

369369
/**
370370
* Used to help with testing.
371+
*
372+
* @param duration Duration of sleep in millis.
371373
*/
372374
protected void sleep(long duration) throws InterruptedException {
373375
TimeUnit.MILLISECONDS.sleep(duration);

wrapper/src/main/java/software/amazon/jdbc/plugin/efm2/MonitorImpl.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,10 @@ public class MonitorImpl implements Monitor {
9595
* instance is monitoring.
9696
* @param properties The {@link Properties} containing additional monitoring
9797
* configuration.
98+
* @param failureDetectionTimeMillis A failure detection time in millis.
99+
* @param failureDetectionIntervalMillis A failure detection interval in millis.
100+
* @param failureDetectionCount A failure detection count.
101+
* @param abortedConnectionsCounter Aborted connection telemetry counter.
98102
*/
99103
public MonitorImpl(
100104
final @NonNull PluginService pluginService,

wrapper/src/main/java/software/amazon/jdbc/plugin/efm2/MonitorService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ MonitorConnectionContext startMonitoring(
3939
* Removes the context from the {@link MonitorImpl}.
4040
*
4141
* @param context The {@link MonitorConnectionContext} representing a connection.
42+
* @param connectionToAbort A connection to abort.
4243
*/
4344
void stopMonitoring(MonitorConnectionContext context, Connection connectionToAbort);
4445

wrapper/src/main/java/software/amazon/jdbc/plugin/efm2/MonitorServiceImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,9 @@ public void releaseResources() {
160160
*
161161
* @param hostSpec Information such as hostname of the server.
162162
* @param properties The user configuration for the current connection.
163+
* @param failureDetectionTimeMillis A failure detection time in millis.
164+
* @param failureDetectionIntervalMillis A failure detection interval in millis.
165+
* @param failureDetectionCount A failure detection count.
163166
* @return A {@link MonitorImpl} object associated with a specific server.
164167
*/
165168
protected Monitor getMonitor(

wrapper/src/main/java/software/amazon/jdbc/plugin/failover2/FailoverConnectionPlugin.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,7 @@ protected void invalidInvocationOnClosedConnection() throws SQLException {
277277
/**
278278
* Checks if the given method is allowed on closed connections.
279279
*
280+
* @param methodName A method name to check.
280281
* @return true if the given method is allowed on closed connections
281282
*/
282283
protected boolean allowedOnClosedConnection(final String methodName) {

0 commit comments

Comments
 (0)