@NotThreadSafe public static class BlockWorkerDataReader.Factory extends Object implements DataReader.Factory
BlockWorkerDataReader
s.Constructor and Description |
---|
Factory(BlockWorker blockWorker,
long blockId,
long chunkSize,
InStreamOptions options)
Creates an instance of
BlockWorkerDataReader.Factory . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
DataReader |
create(long offset,
long len)
Creates an instance of
DataReader . |
public Factory(BlockWorker blockWorker, long blockId, long chunkSize, InStreamOptions options)
BlockWorkerDataReader.Factory
.blockWorker
- the block workerblockId
- the block IDchunkSize
- chunk size in bytesoptions
- the instream optionspublic 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.