diff --git a/README.md b/README.md index 80102b24f..801df5c80 100644 --- a/README.md +++ b/README.md @@ -531,11 +531,13 @@ You can include additional monitoring configurations by adding the prefix `monit ## **Experimental** Enhanced Failure Monitoring Plugin v2 -> [!WARNING] This plugin is experimental and users should test the plugin before using it in production environment. +> [!WARNING] +> This plugin is experimental and users should test the plugin before using it in production environment. Enhanced Failure Monitoring Plugin v2 is an alternative implementation of enhanced failure monitoring, and it is functionally equal to the Enhanced Failure Monitoring Plugin described above. Both plugins share the same set of [configuration parameters](#enhanced-failure-monitoring-parameters). Enhanced Failure Monitoring Plugin v2 plugin is designed to be a drop-in replacement for the Enhanced Failure Monitoring Plugin. -> [!NOTE] Since these two plugins are separate plugins, users may decide to use them together with a single connection. While this should not have any negative side effects, it is not recommended. It is recommended to use either the Enhanced Failure Monitoring Plugin, or the Enhanced Failure Monitoring Plugin v2 where it's needed. +> [!NOTE] +> Since these two plugins are separate plugins, users may decide to use them together with a single connection. While this should not have any negative side effects, it is not recommended. It is recommended to use either the Enhanced Failure Monitoring Plugin, or the Enhanced Failure Monitoring Plugin v2 where it's needed. In order to use Enhanced Failure Monitoring Plugin v2, users should add `software.aws.rds.jdbc.mysql.shading.com.mysql.cj.jdbc.ha.plugins.efm2.NodeMonitoringConnectionPluginFactory` to `connectionPluginFactories`. diff --git a/src/main/user-impl/java/com/mysql/cj/jdbc/ha/plugins/efm2/Monitor.java b/src/main/user-impl/java/com/mysql/cj/jdbc/ha/plugins/efm2/Monitor.java index 3940c225a..c2b6662d2 100644 --- a/src/main/user-impl/java/com/mysql/cj/jdbc/ha/plugins/efm2/Monitor.java +++ b/src/main/user-impl/java/com/mysql/cj/jdbc/ha/plugins/efm2/Monitor.java @@ -90,7 +90,6 @@ public class Monitor implements IMonitor { private final String defaultTimeoutMillis; - // TODO: constructor javadoc params /** * Store the monitoring configuration for a connection. * @@ -98,16 +97,20 @@ public class Monitor implements IMonitor { * @param hostInfo The {@link HostInfo} of the server this {@link Monitor} instance is * monitoring. * @param propertySet The {@link PropertySet} containing additional monitoring configuration. + * @param failureDetectionTimeMillis Grace period after which node monitoring starts. + * @param failureDetectionIntervalMillis Interval between each failed connection check. + * @param failureDetectionCount Number of failed connection checks before considering + * database node as unhealthy. * @param logger A {@link Log} implementation. */ public Monitor( - IConnectionProvider connectionProvider, - HostInfo hostInfo, - PropertySet propertySet, + final IConnectionProvider connectionProvider, + final HostInfo hostInfo, + final PropertySet propertySet, final int failureDetectionTimeMillis, final int failureDetectionIntervalMillis, final int failureDetectionCount, - Log logger) { + final Log logger) { this.connectionProvider = connectionProvider; this.hostInfo = hostInfo;