Skip to content

Commit b303acc

Browse files
authored
Fix javadoc warnings/errors (#1480)
1 parent 63f3ada commit b303acc

File tree

5 files changed

+24
-12
lines changed

5 files changed

+24
-12
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@
2323
* Interface for connection plugin factories. This class implements ways to initialize a connection
2424
* plugin.
2525
*
26-
* @apiNote Consider using {@link ServicesContainerPluginFactory} for new implementations as it provides access to all
27-
* services in the {@link FullServicesContainer}.
26+
* <p>Note: consider using {@link ServicesContainerPluginFactory} for new implementations as it provides access to all
27+
* services in the {@link FullServicesContainer}.
2828
*/
2929
public interface ConnectionPluginFactory {
3030

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ public Connection connect(
209209
*
210210
* @param props The connection properties.
211211
* @return {@link CustomEndpointMonitor}
212+
* @throws SQLException if an error occurs while attempting to create the monitor.
212213
*/
213214
protected CustomEndpointMonitor createMonitorIfAbsent(Properties props) throws SQLException {
214215
return this.servicesContainer.getMonitorService().runIfAbsent(

wrapper/src/main/java/software/amazon/jdbc/util/connection/ConnectionService.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public interface ConnectionService {
3030
* @param hostSpec the hostSpec containing the host information for the auxiliary connection.
3131
* @param props the properties for the auxiliary connection.
3232
* @return a new connection to the given host using the given props.
33+
* @throws SQLException if an error occurs while opening the connection.
3334
*/
3435
Connection open(HostSpec hostSpec, Properties props) throws SQLException;
3536

wrapper/src/main/java/software/amazon/jdbc/util/monitoring/MonitorService.java

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ public interface MonitorService {
4040
* last-updated timestamp within this duration it will be considered stuck.
4141
* @param errorResponses a {@link Set} defining actions to take if the monitor is stuck or in an error state.
4242
* @param producedDataClass the class of data produced by the monitor.
43+
* @param <T> the type of the monitor.
4344
*/
4445
<T extends Monitor> void registerMonitorTypeIfAbsent(
4546
Class<T> monitorClass,
@@ -52,18 +53,20 @@ <T extends Monitor> void registerMonitorTypeIfAbsent(
5253
* Creates and starts the given monitor if it does not already exist and stores it under the given monitor type and
5354
* key. If the monitor already exists, its expiration time will be renewed, even if it was already expired.
5455
*
55-
* @param monitorClass the concrete class of the monitor, eg `CustomEndpointMonitorImpl.class`.
56-
* @param key the key for the monitor, eg
57-
* "custom-endpoint.cluster-custom-XYZ.us-east-2.rds.amazonaws.com:5432".
58-
* @param storageService the storage service for the monitor to use.
56+
* @param monitorClass the concrete class of the monitor, eg `CustomEndpointMonitorImpl.class`.
57+
* @param key the key for the monitor, eg
58+
* "custom-endpoint.cluster-custom-XYZ.us-east-2.rds.amazonaws.com:5432".
59+
* @param storageService the storage service for the monitor to use.
5960
* @param telemetryFactory the telemetry factory for creating telemetry data.
60-
* @param originalUrl the URL of the original database connection.
61-
* @param driverProtocol the protocol for the underlying target driver.
62-
* @param driverDialect the target driver dialect.
63-
* @param dbDialect the database dialect.
64-
* @param originalProps the properties of the original database connection.
65-
* @param initializer an initializer function to use to create the monitor if it does not already exist.
61+
* @param originalUrl the URL of the original database connection.
62+
* @param driverProtocol the protocol for the underlying target driver.
63+
* @param driverDialect the target driver dialect.
64+
* @param dbDialect the database dialect.
65+
* @param originalProps the properties of the original database connection.
66+
* @param initializer an initializer function to use to create the monitor if it does not already exist.
67+
* @param <T> the type of the monitor.
6668
* @return the new or existing monitor.
69+
* @throws SQLException if an error occurs while trying to create the monitor.
6770
*/
6871
<T extends Monitor> T runIfAbsent(
6972
Class<T> monitorClass,
@@ -82,6 +85,7 @@ <T extends Monitor> T runIfAbsent(
8285
*
8386
* @param monitorClass the expected class of the monitor.
8487
* @param key the key for the monitor.
88+
* @param <T> the type of the monitor.
8589
* @return the monitor stored at the given key.
8690
*/
8791
@Nullable
@@ -93,6 +97,7 @@ <T extends Monitor> T runIfAbsent(
9397
*
9498
* @param monitorClass the expected class of the monitor.
9599
* @param key the key for the monitor.
100+
* @param <T> the type of the monitor.
96101
* @return the monitor that was removed. Returns null if there was no monitor at the given key or the expected monitor
97102
* class did not match the actual monitor class.
98103
*/
@@ -105,13 +110,15 @@ <T extends Monitor> T runIfAbsent(
105110
* @param monitorClass the class of the monitor, eg `CustomEndpointMonitorImpl.class`.
106111
* @param key the key for the monitor, eg
107112
* "custom-endpoint.cluster-custom-XYZ.us-east-2.rds.amazonaws.com:5432".
113+
* @param <T> the type of the monitor.
108114
*/
109115
<T extends Monitor> void stopAndRemove(Class<T> monitorClass, Object key);
110116

111117
/**
112118
* Stops all monitors for the given type and removes them from the monitor service.
113119
*
114120
* @param monitorClass the class of the monitor, eg `CustomEndpointMonitorImpl.class`.
121+
* @param <T> the type of the monitor.
115122
*/
116123
<T extends Monitor> void stopAndRemoveMonitors(Class<T> monitorClass);
117124

wrapper/src/main/java/software/amazon/jdbc/util/storage/CacheItem.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,9 @@ protected boolean isExpired() {
6666

6767
/**
6868
* Renews a cache item's expiration time.
69+
*
70+
* @param timeToLiveNanos the duration that the item should sit in the cache before being considered expired, in
71+
* nanoseconds.
6972
*/
7073
protected void extendExpiration(long timeToLiveNanos) {
7174
this.expirationTimeNanos = System.nanoTime() + timeToLiveNanos;

0 commit comments

Comments
 (0)