Elffuss BraidHub

kikocis/java-driver public

Change Statement-level read timeout to int (for consistency with SocketOptions).
Changeset95e17baa7f4fa5822f1eb888ad316188bf20cf60de74ea99a1d2040090588af7
Authorolim7t <omichallat+github@gmail.com> · 2016-01-27 15:24 +01:00
Committerolim7t <omichallat+github@gmail.com> · 2016-01-27 15:24 +01:00
Parentse3de241dc92a

Browse the files at this changeset

2 files changed

modified driver-core/src/main/java/com/datastax/driver/core/Statement.java +3 −3
@@ -63,7 +63,7 @@
6363 private volatile boolean traceQuery;
6464 private volatile int fetchSize;
6565 private volatile long defaultTimestamp = Long.MIN_VALUE;
66- private volatile long readTimeoutMillis = Long.MIN_VALUE;
66+ private volatile int readTimeoutMillis = Integer.MIN_VALUE;
6767 private volatile RetryPolicy retryPolicy;
6868 private volatile ByteBuffer pagingState;
6969 protected volatile Boolean idempotent;
@@ -332,7 +332,7 @@
332332 * @param readTimeoutMillis the timeout to set. Must be greater than 0 (or the default will be used).
333333 * @return this {@code Statement} object.
334334 */
335- public Statement setReadTimeoutMillis(long readTimeoutMillis) {
335+ public Statement setReadTimeoutMillis(int readTimeoutMillis) {
336336 this.readTimeoutMillis = readTimeoutMillis;
337337 return this;
338338 }
@@ -343,7 +343,7 @@
343343 * @return the timeout. Note that a negative value means that the default
344344 * {@link SocketOptions#getReadTimeoutMillis()} will be used.
345345 */
346- public long getReadTimeoutMillis() {
346+ public int getReadTimeoutMillis() {
347347 return readTimeoutMillis;
348348 }
349349
modified driver-core/src/main/java/com/datastax/driver/core/StatementWrapper.java +2 −2
@@ -152,12 +152,12 @@
152152 }
153153
154154 @Override
155- public Statement setReadTimeoutMillis(long readTimeoutMillis) {
155+ public Statement setReadTimeoutMillis(int readTimeoutMillis) {
156156 return wrapped.setReadTimeoutMillis(readTimeoutMillis);
157157 }
158158
159159 @Override
160- public long getReadTimeoutMillis() {
160+ public int getReadTimeoutMillis() {
161161 return wrapped.getReadTimeoutMillis();
162162 }
163163