@@ -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
0 commit comments