@NotThreadSafe public static class LocalFileDataReader.Factory extends Object implements DataReader.Factory
LocalFileDataReader
s.Constructor and Description |
---|
Factory(FileSystemContext context,
WorkerNetAddress address,
long blockId,
long localReaderChunkSize,
InStreamOptions options)
Creates an instance of
LocalFileDataReader.Factory . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
DataReader |
create(long offset,
long len)
Creates an instance of
DataReader . |
public Factory(FileSystemContext context, WorkerNetAddress address, long blockId, long localReaderChunkSize, InStreamOptions options) throws IOException
LocalFileDataReader.Factory
.context
- the file system contextaddress
- the worker addressblockId
- the block IDlocalReaderChunkSize
- chunk size in bytes for local readsoptions
- the InStream optionsIOException
public DataReader create(long offset, long len) throws IOException
DataReader.Factory
DataReader
.create
in interface DataReader.Factory
offset
- the stream offsetlen
- the length of the streamIOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2023. All Rights Reserved.