Elffuss BraidHub

kikocis/java-driver public

Fix typos in Session javadocs.
Changeset612056fe2567ef58dfd9837c96a981108a220021ffbcf5dd0a60565f936d87ea
AuthorAlexandre Dutra <alexandre.dutra@datastax.com> · 2015-12-28 10:29 +01:00
Committerolim7t <omichallat+github@gmail.com> · 2016-01-04 18:04 +01:00
Parentsbf1b4ac3f151

Browse the files at this changeset

1 file changed

modified driver-core/src/main/java/com/datastax/driver/core/Session.java +25 −25
@@ -26,15 +26,15 @@
2626 * <p/>
2727 * Each session maintains multiple connections to the cluster nodes,
2828 * provides policies to choose which node to use for each query (round-robin on
29- * all nodes of the cluster by default), and handles retries for failed query (when
29+ * all nodes of the cluster by default), and handles retries for failed queries (when
3030 * it makes sense), etc...
3131 * <p/>
3232 * Session instances are thread-safe and usually a single instance is enough
3333 * per application. As a given session can only be "logged" into one keyspace at
34- * a time (where the "logged" keyspace is the one used by query if the query doesn't
35- * explicitely use a fully qualified table name), it can make sense to create one
36- * session per keyspace used. This is however not necessary to query multiple keyspaces
37- * since it is always possible to use a single session with fully qualified table name
34+ * a time (where the "logged" keyspace is the one used by queries that don't
35+ * explicitly use a fully qualified table name), it can make sense to create one
36+ * session per keyspace used. This is however not necessary when querying multiple keyspaces
37+ * since it is always possible to use a single session with fully qualified table names
3838 * in queries.
3939 */
4040 public interface Session extends Closeable {
@@ -54,18 +54,18 @@
5454 * Force the initialization of this Session instance if it hasn't been
5555 * initialized yet.
5656 * <p/>
57- * Please note first that most use won't need to call this method
58- * explicitly. If you use the {@link Cluster#connect} method {@code Cluster}
57+ * Please note first that most users won't need to call this method
58+ * explicitly. If you use the {@link Cluster#connect} method
5959 * to create your Session, the returned session will be already
6060 * initialized. Even if you create a non-initialized session through
6161 * {@link Cluster#newSession}, that session will get automatically
62- * initialized the first time that session is used for querying. This method
62+ * initialized the first time it is used for querying. This method
6363 * is thus only useful if you use {@link Cluster#newSession} and want to
6464 * explicitly force initialization without querying.
6565 * <p/>
6666 * Session initialization consists in connecting the Session to the known
6767 * Cassandra hosts (at least those that should not be ignored due to
68- * the {@code LoadBalancingPolicy} in place).
68+ * the {@link com.datastax.driver.core.policies.LoadBalancingPolicy LoadBalancingPolicy} in place).
6969 * <p/>
7070 * If the Cluster instance this Session depends on is not itself
7171 * initialized, it will be initialized by this method.
@@ -74,10 +74,10 @@
7474 *
7575 * @return this {@code Session} object.
7676 * @throws NoHostAvailableException if this initialization triggers the
77- * Cluster initialization and no host amongst the contact points can be
77+ * {@link Cluster} initialization and no host amongst the contact points can be
7878 * reached.
7979 * @throws AuthenticationException if this initialization triggers the
80- * Cluster initialization and an authentication error occurs while contacting
80+ * {@link Cluster} initialization and an authentication error occurs while contacting
8181 * the initial contact points.
8282 */
8383 Session init();
@@ -138,7 +138,7 @@
138138 * database. However, for SELECT queries, it does not guarantee that the
139139 * result has been received in full. But it does guarantee that some
140140 * response has been received from the database, and in particular
141- * guarantee that if the request is invalid, an exception will be thrown
141+ * guarantees that if the request is invalid, an exception will be thrown
142142 * by this method.
143143 *
144144 * @param statement the CQL query to execute (that can be any {@link Statement}).
@@ -192,11 +192,11 @@
192192 * submitted to a live node. Any exception pertaining to the failure of the
193193 * query will be thrown when accessing the {@link ResultSetFuture}.
194194 * <p/>
195- * Note that for queries that doesn't return a result (INSERT, UPDATE and
196- * DELETE), you will need to access the ResultSetFuture (that is call one of
197- * its get method to make sure the query was successful.
195+ * Note that for queries that don't return a result (INSERT, UPDATE and
196+ * DELETE), you will need to access the ResultSetFuture (that is, call one of
197+ * its {@code get} methods to make sure the query was successful.
198198 *
199- * @param statement the CQL query to execute (that can be either any {@code Statement}.
199+ * @param statement the CQL query to execute (that can be any {@code Statement}).
200200 * @return a future on the result of the query.
201201 * @throws UnsupportedFeatureException if the protocol version 1 is in use and
202202 * a feature not supported has been used. Features that are not supported by
@@ -287,7 +287,7 @@
287287 * Initiates a shutdown of this session instance.
288288 * <p/>
289289 * This method is asynchronous and return a future on the completion
290- * of the shutdown process. As soon a the session is shutdown, no
290+ * of the shutdown process. As soon as the session is shutdown, no
291291 * new request will be accepted, but already submitted queries are
292292 * allowed to complete. This method closes all connections of this
293293 * session and reclaims all resources used by it.
@@ -328,7 +328,7 @@
328328 /**
329329 * Whether this Session instance has been closed.
330330 * <p/>
331- * Note that this method returns true as soon as one closing this Session
331+ * Note that this method returns true as soon as the closing of this Session
332332 * has started but it does not guarantee that the closing is done. If you
333333 * want to guarantee that the closing is done, you can call {@code close()}
334334 * and wait until it returns (or call the get method on {@code closeAsync()}
@@ -362,7 +362,7 @@
362362 * The state of a Session.
363363 * <p/>
364364 * This mostly exposes information on the connections maintained by a Session:
365- * which host it is connected to, how many connection is has for each host, etc...
365+ * which host it is connected to, how many connections it has for each host, etc...
366366 */
367367 interface State {
368368 /**
@@ -377,9 +377,9 @@
377377 * this State has been grabbed).
378378 * <p/>
379379 * Please note that this method really returns the hosts for which the session currently
380- * holds a connection pool. A such, it's unlikely but not impossible for a host to be listed
380+ * holds a connection pool. As such, it's unlikely but not impossible for a host to be listed
381381 * in the output of this method but to have {@code getOpenConnections} return 0, if the
382- * pool itself is created but not connections have been successfully opened yet.
382+ * pool itself is created but no connections have been successfully opened yet.
383383 *
384384 * @return an immutable collection of the hosts to which the session is connected.
385385 */
@@ -412,11 +412,11 @@
412412 int getTrashedConnections(Host host);
413413
414414 /**
415- * The number of queries that are currently being executed though a given host.
415+ * The number of queries that are currently being executed through a given host.
416416 * <p/>
417- * This correspond to the number of queries that have been sent (by the session this
418- * is a State of) to the Cassandra Host on one of its connection but haven't yet returned.
419- * In that sense this provide a sort of measure of how busy the connections to that node
417+ * This corresponds to the number of queries that have been sent (by the session this
418+ * is a State of) to the Cassandra Host on one of its connections but haven't yet returned.
419+ * In that sense this provides a sort of measure of how busy the connections to that node
420420 * are (at the time the {@code State} was grabbed at least).
421421 *
422422 * @param host the host to get in-flight queries for.