title: How to get number of fetched rows after result set has been consumed?
body: <p>I followed the instruction on <a href="http://www.datastax.com/dev/blog/java-driver-async-queries" rel="nofollow">the official cassandra website</a> in order to consume the result sets of my queries in an asynchronous manner.  </p>
  
  <pre><code>ResultSetFuture future = session.executeAsync("SELECT release_version FROM system.local");
  Futures.addCallback(future,
      new FutureCallback&lt;ResultSet&gt;() {
          @Override public void onSuccess(ResultSet result) {
              gui.setMessage("Cassandra version is " + result.one().getString("release_version"));
          }
  
          @Override public void onFailure(Throwable t) {
              gui.setMessage("Error while reading Cassandra version: " + t.getMessage());
          }
      },
      MoreExecutors.sameThreadExecutor()
  );
  </code></pre>
  
  <p>This basically works fine but in order to see how many rows have been fetched, I wrapped my FutureCallback into a LogAwareCallback which, a bit simplified, looks like this: </p>
  
  <pre><code>private static final class LogAwareCallback implements FutureCallback&lt;ResultSet&gt; {
  
      private final FutureCallback&lt;ResultSet&gt; origin;
      private final String query;
      private final Object [] parameters;
  
      private LogAwareCallback(
              FutureCallback&lt;ResultSet&gt; origin,
              String query,
              Object [] parameters) {
          this.origin = origin;
          this.query = query;
          this.parameters = parameters;   
      }
  
      @Override
      public void onSuccess(ResultSet rows) {
          origin.onSuccess(rows);
  
          // as all rows should have been processed at this state,
          // it should be safe to call all with size now
          int resultSize = rows.all().size();
          log(query, parameters, resultSize);             
      }
  
      @Override
      public void onFailure(Throwable throwable) {
          // FAILURE HANDLING...
      }
  
      private void log(String query, Object [] parameters, int resultSize) {
          // LOG result size for given query
      }
  }
  </code></pre>
  
  <p>The problem though is, that the wrapped FutureCallback already consumed the whole result set at this point in time and I always get a result size of 0 although multiple rows have been processed. </p>
  
  <p>Thus my question is, if there is a way to get the count of returned rows from the ResultSet even if has been fully consumed? </p>