Added request counter to Paginator

Added instrumentation for Paginator so API clients can understand the number of requests executed per search.
How about the paginator returning the number of pages it processed. That
seems to be something it should be able to respond. Plus it's equivalent to
this code only with a better name.

Otherwise the HttpRequestInitializer approach sounds reasonable.

On Thu, Nov 6, 2014, 9:59 AM Kelly Westbrooks <notifications@github.com>
wrote:

> In src/main/java/com/google/cloud/genomics/utils/Paginator.java:
>
> > @@ -705,6 +705,9 @@ private Variantsets(Genomics genomics) {
> >
> >    private final Genomics genomics;
> >
> > +  private long successfulRequests = 0;
>
> I guess the reason I suggested that is because I'm not sure if it should
> be the responsibility of Paginator to track this information.
>
> I can suggest another way to count successful request that doesn't modify
> Paginator: Pass the .create() method an instance of a Genomics stub that
> was constructed from a custom HttpRequestInitializer that counts the number
> of requests made, and use a custom HttpUnsuccessfulResponseHandler to count
> the number of requests that fail. The difference between the numbers is the
> number of successful requests.
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/googlegenomics/utils-java/pull/10/files#r19961647>.
>