public static class NettyPacketReader.Factory extends Object implements PacketReader.Factory
NettyPacketReader
s.Constructor and Description |
---|
Factory(FileSystemContext context,
WorkerNetAddress address,
Protocol.ReadRequest readRequestPartial)
Creates an instance of
NettyPacketReader.Factory for block reads. |
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, Protocol.ReadRequest readRequestPartial)
NettyPacketReader.Factory
for block reads.context
- the file system contextaddress
- the worker addressreadRequestPartial
- the partial read requestpublic 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.