The retrieval of the rows of a ResultSet is generally paged (a first page of result is fetched and the next one is only fetched once all the results of the first one has been consumed). The size of the pages can be configured either globally through {@link QueryOptions#setFetchSize} or per-statementwith {@link Statement#setFetchSize}. Though new pages are automatically (and transparently) fetched when needed, it is possible to force the retrieval of the next page early through {@link #fetchMoreResults}. Please note however that this ResultSet paging is not available with the version 1 of the native protocol (i.e. with Cassandra 1.2 or if version 1 has been explicitly requested through {@link Cluster.Builder#withProtocolVersion}). If the protocol version 1 is in use, a ResultSet is always fetched in it's entirely and it's up to the client to make sure that no query can yield ResultSet that won't hold in memory.
Note that this class is not thread-safe.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|