Note this class is only relevant when metric is enabled. Otherwise it should not even be involved in the call stack to minimize runtime overhead.
383940414243444546
private final HttpRequestBase httpRequest; public S3ObjectInputStream(InputStream in, HttpRequestBase httpRequest) { super(wrapWithByteCounting(in) ? new MetricFilterInputStream(S3ServiceMetric.S3DownloadThroughput, in) : in); this.httpRequest = httpRequest; }
46474849505152535455
InputStream in, HttpRequestBase httpRequest, boolean collectMetrics) { super(collectMetrics ? new MetricFilterInputStream(S3ServiceMetric.S3DownloadThroughput, in) : in); this.httpRequest = httpRequest; }