Packages

c

org.apache.spark.io

ReadAheadInputStream

class ReadAheadInputStream extends InputStream

InputStream implementation which asynchronously reads ahead from the underlying input stream when specified amount of data has been read from the current buffer. It does it by maintaining two buffers - active buffer and read ahead buffer. Active buffer contains data which should be returned when a read() call is issued. The read ahead buffer is used to asynchronously read from the underlying input stream and once the current active buffer is exhausted, we flip the two buffers so that we can start reading from the read ahead buffer without being blocked in disk I/O.

Source
ReadAheadInputStream.java
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ReadAheadInputStream
  2. InputStream
  3. Closeable
  4. AutoCloseable
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new ReadAheadInputStream(inputStream: InputStream, bufferSizeInBytes: Int)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def available(): Int
    Definition Classes
    ReadAheadInputStream → InputStream
    Annotations
    @Override()
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @IntrinsicCandidate() @native()
  7. def close(): Unit
    Definition Classes
    ReadAheadInputStream → InputStream → Closeable → AutoCloseable
    Annotations
    @Override()
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  11. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @IntrinsicCandidate() @native()
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def mark(arg0: Int): Unit
    Definition Classes
    InputStream
  14. def markSupported(): Boolean
    Definition Classes
    InputStream
  15. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  16. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  17. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @IntrinsicCandidate() @native()
  18. def read(b: Array[Byte], offset: Int, len: Int): Int
    Definition Classes
    ReadAheadInputStream → InputStream
    Annotations
    @Override()
  19. def read(): Int
    Definition Classes
    ReadAheadInputStream → InputStream
    Annotations
    @Override()
  20. def read(arg0: Array[Byte]): Int
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  21. def readAllBytes(): Array[Byte]
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  22. def readNBytes(arg0: Array[Byte], arg1: Int, arg2: Int): Int
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  23. def readNBytes(arg0: Int): Array[Byte]
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  24. def reset(): Unit
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  25. def skip(n: Long): Long
    Definition Classes
    ReadAheadInputStream → InputStream
    Annotations
    @Override()
  26. def skipNBytes(arg0: Long): Unit
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  27. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  28. def toString(): String
    Definition Classes
    AnyRef → Any
  29. def transferTo(arg0: OutputStream): Long
    Definition Classes
    InputStream
    Annotations
    @throws(classOf[java.io.IOException])
  30. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  31. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  32. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from InputStream

Inherited from Closeable

Inherited from AutoCloseable

Inherited from AnyRef

Inherited from Any

Ungrouped