I added support for the Closeable interface in MySqlConnectionFactory and I also removed the invocation of the deprecated getSocketTimeout() and replaced it with null in MySqlConnectionFactory. Let me know if there are any problems in the code.
Motivation: MySqlConnectionFactory could benefit from a way to release its resources through implementing the Closeable interface.
Modification: MySqlConnectionFactory now implements Closeable and contains the close() method that will remove the reference to the connection publisher. I removed the final keyword from the client reference so that it can be reassigned. I removed the configuration.getSocketTimeout() parameter from Client.connect in the from() method and replaced it with null.
Result: MySqlConnectionFactory now has a way for users to release its resources.
@jchrys #66
I added support for the Closeable interface in MySqlConnectionFactory and I also removed the invocation of the deprecated getSocketTimeout() and replaced it with null in MySqlConnectionFactory. Let me know if there are any problems in the code.
Motivation: MySqlConnectionFactory could benefit from a way to release its resources through implementing the Closeable interface.
Modification: MySqlConnectionFactory now implements Closeable and contains the close() method that will remove the reference to the connection publisher. I removed the final keyword from the client reference so that it can be reassigned. I removed the configuration.getSocketTimeout() parameter from Client.connect in the from() method and replaced it with null.
Result: MySqlConnectionFactory now has a way for users to release its resources.