Package com.amazonaws.metrics
Class MetricFilterInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- com.amazonaws.internal.SdkFilterInputStream
-
- com.amazonaws.metrics.MetricFilterInputStream
-
- All Implemented Interfaces:
com.amazonaws.internal.MetricAware,com.amazonaws.internal.Releasable,Closeable,AutoCloseable
public class MetricFilterInputStream extends com.amazonaws.internal.SdkFilterInputStreamUsed to capture the input stream throughput metrics, but excluding theSdkFilterInputStream.read()API.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.
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description MetricFilterInputStream(ThroughputMetricType type, InputStream in)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidclose()booleanisMetricActivated()Returns true if this object or one of it's inner wrapped objects has metrics gathering activity turned on; false otherwise.intread(byte[] b, int off, int len)-
Methods inherited from class com.amazonaws.internal.SdkFilterInputStream
abort, abortIfNeeded, available, mark, markSupported, read, release, reset, skip
-
Methods inherited from class java.io.FilterInputStream
read
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
MetricFilterInputStream
public MetricFilterInputStream(ThroughputMetricType type, InputStream in)
-
-
Method Detail
-
read
public int read(byte[] b, int off, int len) throws IOException- Overrides:
readin classcom.amazonaws.internal.SdkFilterInputStream- Throws:
IOException
-
close
public void close() throws IOException- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Overrides:
closein classcom.amazonaws.internal.SdkFilterInputStream- Throws:
IOException
-
isMetricActivated
public final boolean isMetricActivated()
Description copied from interface:com.amazonaws.internal.MetricAwareReturns true if this object or one of it's inner wrapped objects has metrics gathering activity turned on; false otherwise.- Specified by:
isMetricActivatedin interfacecom.amazonaws.internal.MetricAware- Overrides:
isMetricActivatedin classcom.amazonaws.internal.SdkFilterInputStream
-
-