@NotThreadSafe public static class LocalFilePacketReader.Factory extends Object implements PacketReader.Factory
LocalFilePacketReader
s.Constructor and Description |
---|
Factory(FileSystemContext context,
WorkerNetAddress address,
long blockId,
long packetSize,
InStreamOptions options)
Creates an instance of
LocalFilePacketReader.Factory . |
Modifier and Type | Method and Description |
---|---|
void |
close() |
PacketReader |
create(long offset,
long len)
Creates an instance of
PacketReader . |
boolean |
isShortCircuit() |
public Factory(FileSystemContext context, WorkerNetAddress address, long blockId, long packetSize, InStreamOptions options) throws IOException
LocalFilePacketReader.Factory
.context
- the file system contextaddress
- the worker addressblockId
- the block IDpacketSize
- the packet sizeoptions
- the instream optionsIOException
public PacketReader create(long offset, long len) throws IOException
PacketReader.Factory
PacketReader
.create
in interface PacketReader.Factory
offset
- the stream offsetlen
- the length of the streamIOException
public boolean isShortCircuit()
isShortCircuit
in interface PacketReader.Factory
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
IOException
Copyright © 2023. All Rights Reserved.