Elffuss BraidHub

kikocis/java-driver public

Improve documentation of Session.close (JAVA-729).
Changeset1142d619aded86bad2af60643b5798a03cf01a8c28ea7435d4fd4b060c5ece6c
Authorolim7t <omichallat+github@gmail.com> · 2015-05-06 09:12 +02:00
Committerolim7t <omichallat+github@gmail.com> · 2015-05-06 09:18 +02:00
Parentsecc3d728a770

Browse the files at this changeset

1 file changed

modified driver-core/src/main/java/com/datastax/driver/core/Session.java +13 −4
@@ -296,10 +296,12 @@
296296 * This method has no particular effect if the session was already closed
297297 * (in which case the returned future will return immediately).
298298 * <p>
299- * Note that if you want to close the full {@code Cluster} instance
300- * this session is part of, you should use {@link Cluster#close} instead
301- * (which will call this method for all sessions but also release some
302- * additional resources).
299+ * Note that this method does not close the corresponding {@code Cluster}
300+ * instance (which holds additional resources, in particular internal
301+ * executors that must be shut down in order for the client program to
302+ * terminate).
303+ * If you want to do so, use {@link Cluster#close}, but note that it will
304+ * close all sessions created from that cluster.
303305 *
304306 * @return a future on the completion of the shutdown process.
305307 */
@@ -310,6 +312,13 @@
310312 * that shutdown completes.
311313 * <p>
312314 * This method is a shortcut for {@code closeAsync().get()}.
315+ * <p>
316+ * Note that this method does not close the corresponding {@code Cluster}
317+ * instance (which holds additional resources, in particular internal
318+ * executors that must be shut down in order for the client program to
319+ * terminate).
320+ * If you want to do so, use {@link Cluster#close}, but note that it will
321+ * close all sessions created from that cluster.
313322 */
314323 public void close();
315324