com.google.maps.metrics.RequestMetrics Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of google-maps-services Show documentation
Show all versions of google-maps-services Show documentation
Use the Google Maps API Web Services in Java! https://developers.google.com/maps/documentation/webservices/
package com.google.maps.metrics;
/**
* A type to report common metrics shared among all request types.
*
* If a request retries, there will be multiple calls to all methods below. Ignore any endRequest
* after the first one. For example:
*
*
* - constructor - request starts
*
- startNetwork / endNetwork - original request
*
- startNetwork / endNetwork - retried request
*
- endRequest - request finished (retry)
*
- endRequest - request finished (original)
*
*
* The following metrics can be computed: Total queries, successful queries, total latency,
* network latency
*/
public interface RequestMetrics {
void startNetwork();
void endNetwork();
void endRequest(Exception exception, int httpStatusCode, long retryCount);
}