org.apache.cassandra.io.util

## Class ThrottledReader

- java.lang.Object
- - java.io.InputStream
  - - org.apache.cassandra.io.util.AbstractDataInput
    - - org.apache.cassandra.io.util.RandomAccessReader
      - - org.apache.cassandra.io.util.ThrottledReader

- All Implemented Interfaces:
    java.io.Closeable, java.io.DataInput, java.lang.AutoCloseable, FileDataInput

      public class ThrottledReader
      extends RandomAccessReader

- - ### Nested Class Summary

    - ### Nested classes/interfaces inherited from class org.apache.cassandra.io.util.RandomAccessReader

      `RandomAccessReader.BufferedRandomAccessFileMark`

  - ### Field Summary

    - ### Fields inherited from class org.apache.cassandra.io.util.RandomAccessReader

      `buffer, BUFFER_SIZE, bufferOffset, channel, DEFAULT_BUFFER_SIZE, markedPointer, owner`

  - ### Constructor Summary

    Constructors
    Modifier | Constructor and Description
    --- | ---
    `protected` | `ThrottledReader(ChannelProxy channel, long overrideLength, com.google.common.util.concurrent.RateLimiter limiter)`

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static ThrottledReader` | `open(ChannelProxy channel, long overrideLength, com.google.common.util.concurrent.RateLimiter limiter)`
    `protected void` | `reBuffer()` Read data from file starting from current currentOffset to populate buffer.

    - ### Methods inherited from class org.apache.cassandra.io.util.RandomAccessReader

      `allocateBuffer, bytesPastMark, bytesPastMark, bytesRemaining, close, current, deallocate, getChannel, getFilePointer, getPath, getPosition, getPositionLimit, getTotalBufferSize, isEOF, length, mark, open, open, open, open, read, read, read, readBytes, reset, reset, seek, toString`

    - ### Methods inherited from class org.apache.cassandra.io.util.AbstractDataInput

      `readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes`

    - ### Methods inherited from class java.io.InputStream

      `available, mark, markSupported, skip`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

    - ### Methods inherited from interface java.io.DataInput

      `readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, skipBytes`

- - ### Constructor Detail

    - #### ThrottledReader

          protected ThrottledReader(ChannelProxy channel,
                                    long overrideLength,
                                    com.google.common.util.concurrent.RateLimiter limiter)
                             throws java.io.FileNotFoundException

      Throws:
        `java.io.FileNotFoundException`

  - ### Method Detail

    - #### reBuffer

          protected void reBuffer()

      Description copied from class: `RandomAccessReader`
      Read data from file starting from current currentOffset to populate buffer.
      Overrides:
        `reBuffer` in class `RandomAccessReader`

    - #### open

          public static ThrottledReader open(ChannelProxy channel,
                                             long overrideLength,
                                             com.google.common.util.concurrent.RateLimiter limiter)

Copyright © 2018 The Apache Software Foundation