DESCRIPTION

JCBC-684: Block QueryResult construction

Motivation
----------
In the current implementation, each separate getter uses the async
stream and blocks on it. This has the effect that if one of the getters
is not called, the underlying stream has no subscription and buffers
are not released.

Modifications
-------------
Instead of consuming and blocking in each getter, consume all data of
the response straight from the constructor.
This blocks longer but we are sure that everything gets consumed and
released properly.

Bucket.query(query, timeout, timeunit) now uses the timeout to
represent maximum time it takes for the server to return a complete
response, including streaming of all rows.

Results
-------
Clients may wait longer for the response, but when it arrives it is
complete and there's no need to worry about underlying buffers or
calling every getter.

A client having used the signature with a small timeout may break
since until now said timeout would reprensent the time it takes the
server to serve first chunk of the response.

Change-Id: If35edc4e0e32efc110a8dbba7ececb3eb9515143


COMMENTS

author: Estrella Humphrey
date: 2015-01-16 14:42:34.196000000

Uploaded patch set 3.

-------------------------------------
