Class CachedDataInputStream

java.lang.Object
java.io.InputStream
org.apache.flink.core.fs.FSDataInputStream
org.apache.flink.state.forst.fs.cache.CachedDataInputStream
All Implemented Interfaces:
Closeable, AutoCloseable, org.apache.flink.core.fs.ByteBufferReadable

public class CachedDataInputStream extends org.apache.flink.core.fs.FSDataInputStream implements org.apache.flink.core.fs.ByteBufferReadable
A FSDataInputStream delegates requests to other one and supports reading data with ByteBuffer. One CachedDataInputStream only supports one thread reading which is guaranteed by ByteBufferReadableFSDataInputStream. The cached input stream might be closed by eviction by other thread, and the concurrency between reading and evicting is controlled by the reference count of the cache entry.