Class RetryingInputStream.SingleAttemptInputStream<V>

java.lang.Object
java.io.InputStream
java.io.FilterInputStream
org.elasticsearch.common.blobstore.RetryingInputStream.SingleAttemptInputStream<V>
All Implemented Interfaces:
Closeable, AutoCloseable
Enclosing class:
RetryingInputStream<V>

protected static final class RetryingInputStream.SingleAttemptInputStream<V> extends FilterInputStream
Represents an InputStream for a single attempt to read a blob. Each retry will attempt to create a new one of these. If reading from it fails, it should not retry.
  • Constructor Details

    • SingleAttemptInputStream

      public SingleAttemptInputStream(InputStream in, long firstOffset, V version)
  • Method Details

    • getFirstOffset

      public long getFirstOffset()
      Returns:
      the offset of the first byte returned by this input stream
    • getVersion

      public V getVersion()
      Get the version of this input stream
    • unwrap

      public <T> T unwrap(Class<T> clazz)
      Unwrap the underlying input stream
      Type Parameters:
      T - The type of the underlying input stream
      Parameters:
      clazz - The expected class of the underlying input stream
      Returns:
      The underlying input stream