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.SdkFilterInputStream
Used to capture the input stream throughput metrics, but excluding the SdkFilterInputStream.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.

  • Constructor Details

  • Method Details

    • read

      public int read(byte[] b, int off, int len) throws IOException
      Overrides:
      read in class com.amazonaws.internal.SdkFilterInputStream
      Throws:
      IOException
    • close

      public void close() throws IOException
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class com.amazonaws.internal.SdkFilterInputStream
      Throws:
      IOException
    • isMetricActivated

      public final boolean isMetricActivated()
      Description copied from interface: com.amazonaws.internal.MetricAware
      Returns true if this object or one of it's inner wrapped objects has metrics gathering activity turned on; false otherwise.
      Specified by:
      isMetricActivated in interface com.amazonaws.internal.MetricAware
      Overrides:
      isMetricActivated in class com.amazonaws.internal.SdkFilterInputStream