public class ThrottledReader extends RandomAccessReader
RandomAccessReader.BufferedRandomAccessFileMark
buffer, BUFFER_SIZE, bufferOffset, CACHE_FLUSH_INTERVAL_IN_BYTES, channel, current, DEFAULT_BUFFER_SIZE, markedPointer, owner, validBufferBytes
Modifier | Constructor and Description |
---|---|
protected |
ThrottledReader(java.io.File file,
long overrideLength,
com.google.common.util.concurrent.RateLimiter limiter) |
Modifier and Type | Method and Description |
---|---|
static ThrottledReader |
open(java.io.File file,
long overrideLength,
com.google.common.util.concurrent.RateLimiter limiter) |
protected void |
reBuffer()
Read data from file starting from current currentOffset to populate buffer.
|
bufferCursor, bytesPastMark, bytesPastMark, bytesRemaining, close, deallocate, getFilePointer, getPath, getPosition, getTotalBufferSize, isEOF, length, mark, open, open, open, read, read, read, readBytes, reset, reset, resetBuffer, seek, toString, write, write, write
getChannel, getFD, readBoolean, readByte, readChar, readDouble, readFloat, readFully, readFully, readInt, readLine, readLong, readShort, readUnsignedByte, readUnsignedShort, readUTF, setLength, skipBytes, writeBoolean, writeByte, writeBytes, writeChar, writeChars, writeDouble, writeFloat, writeInt, writeLong, writeShort, writeUTF
protected ThrottledReader(java.io.File file, long overrideLength, com.google.common.util.concurrent.RateLimiter limiter) throws java.io.FileNotFoundException
java.io.FileNotFoundException
protected void reBuffer()
RandomAccessReader
reBuffer
in class RandomAccessReader
public static ThrottledReader open(java.io.File file, long overrideLength, com.google.common.util.concurrent.RateLimiter limiter)
Copyright © 2017 The Apache Software Foundation