You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@kafka.apache.org by gw...@apache.org on 2015/08/08 01:07:51 UTC
kafka git commit: Minor: Fixes to Selector's javadoc
Repository: kafka
Updated Branches:
refs/heads/trunk 63b820c59 -> 47c99f387
Minor: Fixes to Selector's javadoc
Author: Ismael Juma <is...@juma.me.uk>
Closes #126 from ijuma/minor-selector-javadoc-fixes and squashes the following commits:
a26f529 [Ismael Juma] Minor fixes to Selector's javadoc
Project: http://git-wip-us.apache.org/repos/asf/kafka/repo
Commit: http://git-wip-us.apache.org/repos/asf/kafka/commit/47c99f38
Tree: http://git-wip-us.apache.org/repos/asf/kafka/tree/47c99f38
Diff: http://git-wip-us.apache.org/repos/asf/kafka/diff/47c99f38
Branch: refs/heads/trunk
Commit: 47c99f38726dd5bd3bf2c2f8a8a999d36b53ffcf
Parents: 63b820c
Author: Ismael Juma <is...@juma.me.uk>
Authored: Fri Aug 7 16:07:45 2015 -0700
Committer: Gwen Shapira <cs...@gmail.com>
Committed: Fri Aug 7 16:07:45 2015 -0700
----------------------------------------------------------------------
.../org/apache/kafka/common/network/Selector.java | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/kafka/blob/47c99f38/clients/src/main/java/org/apache/kafka/common/network/Selector.java
----------------------------------------------------------------------
diff --git a/clients/src/main/java/org/apache/kafka/common/network/Selector.java b/clients/src/main/java/org/apache/kafka/common/network/Selector.java
index aaf60c9..ce20111 100644
--- a/clients/src/main/java/org/apache/kafka/common/network/Selector.java
+++ b/clients/src/main/java/org/apache/kafka/common/network/Selector.java
@@ -45,7 +45,7 @@ import org.slf4j.LoggerFactory;
* A connection can be added to the nioSelector associated with an integer id by doing
*
* <pre>
- * nioSelector.connect(42, new InetSocketAddress("google.com", server.port), 64000, 64000);
+ * nioSelector.connect("42", new InetSocketAddress("google.com", server.port), 64000, 64000);
* </pre>
*
* The connect call does not block on the creation of the TCP connection, so the connect method only begins initiating
@@ -55,8 +55,9 @@ import org.slf4j.LoggerFactory;
* connections are all done using the <code>poll()</code> call.
*
* <pre>
- * List<NetworkRequest> requestsToSend = Arrays.asList(new NetworkRequest(0, myBytes), new NetworkRequest(1, myOtherBytes));
- * nioSelector.poll(TIMEOUT_MS, requestsToSend);
+ * nioSelector.send(new NetworkSend(myDestination, myBytes));
+ * nioSelector.send(new NetworkSend(myOtherDestination, myOtherBytes));
+ * nioSelector.poll(TIMEOUT_MS);
* </pre>
*
* The nioSelector maintains several lists that are reset by each call to <code>poll()</code> which are available via
@@ -123,7 +124,7 @@ public class Selector implements Selectable {
* Begin connecting to the given address and add the connection to this nioSelector associated with the given id
* number.
* <p>
- * Note that this call only initiates the connection, which will be completed on a future {@link #poll(long, List)}
+ * Note that this call only initiates the connection, which will be completed on a future {@link #poll(long)}
* call. Check {@link #connected()} to see which (if any) connections have completed after a given poll call.
* @param id The id for the new connection
* @param address The address to connect to
@@ -171,7 +172,7 @@ public class Selector implements Selectable {
/**
* Disconnect any connections for the given id (if there are any). The disconnection is asynchronous and will not be
- * processed until the next {@link #poll(long, List) poll()} call.
+ * processed until the next {@link #poll(long) poll()} call.
*/
@Override
public void disconnect(String id) {
@@ -228,8 +229,8 @@ public class Selector implements Selectable {
*
* When this call is completed the user can check for completed sends, receives, connections or disconnects using
* {@link #completedSends()}, {@link #completedReceives()}, {@link #connected()}, {@link #disconnected()}. These
- * lists will be cleared at the beginning of each {@link #poll(long, List)} call and repopulated by the call if any
- * completed I/O.
+ * lists will be cleared at the beginning of each {@link #poll(long)} call and repopulated by the call if there is
+ * any completed I/O.
*
* @param timeout The amount of time to wait, in milliseconds. If negative, wait indefinitely.
* @throws IllegalStateException If a send is given for which we have no existing connection or for which there is