Class InboundReadResponse
- java.lang.Object
-
- org.dcache.xrootd.tpc.protocol.messages.AbstractXrootdInboundResponse
-
- org.dcache.xrootd.tpc.protocol.messages.InboundReadResponse
-
- All Implemented Interfaces:
io.netty.util.ReferenceCounted,XrootdInboundResponse,ByteBuffersProvider
public class InboundReadResponse extends AbstractXrootdInboundResponse implements ByteBuffersProvider
Response from third-party source server. The implementation of theByteBuffersProviderinterface assimilates this response with an incoming client write request. The third-party client in effect acts as a pipe between the remote read of the file and the local write. Merging that functionality into a single object allows us to bypass an extra buffer copy.
-
-
Field Summary
-
Fields inherited from class org.dcache.xrootd.tpc.protocol.messages.AbstractXrootdInboundResponse
stat, streamId
-
-
Constructor Summary
Constructors Constructor Description InboundReadResponse(io.netty.buffer.ByteBuf buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetDlen()intgetRequestId()The xrootd request type this is a response tolonggetWriteOffset()intrefCnt()booleanrelease()booleanrelease(int i)io.netty.util.ReferenceCountedretain()io.netty.util.ReferenceCountedretain(int i)voidsetWriteOffset(long writeOffset)java.nio.ByteBuffer[]toByteBuffers()io.netty.util.ReferenceCountedtouch()io.netty.util.ReferenceCountedtouch(java.lang.Object o)-
Methods inherited from class org.dcache.xrootd.tpc.protocol.messages.AbstractXrootdInboundResponse
getStatus, getStreamId
-
-
-
-
Method Detail
-
getDlen
public int getDlen()
-
getRequestId
public int getRequestId()
Description copied from interface:XrootdInboundResponseThe xrootd request type this is a response to- Specified by:
getRequestIdin interfaceXrootdInboundResponse
-
getWriteOffset
public long getWriteOffset()
- Specified by:
getWriteOffsetin interfaceByteBuffersProvider- Returns:
- the current offset to the buffer or channel receiving the written bytes.
-
setWriteOffset
public void setWriteOffset(long writeOffset)
-
toByteBuffers
public java.nio.ByteBuffer[] toByteBuffers()
- Specified by:
toByteBuffersin interfaceByteBuffersProvider- Returns:
- NIO buffer array produced from the Netty ByteBuf.
-
refCnt
public int refCnt()
- Specified by:
refCntin interfaceio.netty.util.ReferenceCounted
-
retain
public io.netty.util.ReferenceCounted retain()
- Specified by:
retainin interfaceio.netty.util.ReferenceCounted
-
retain
public io.netty.util.ReferenceCounted retain(int i)
- Specified by:
retainin interfaceio.netty.util.ReferenceCounted
-
touch
public io.netty.util.ReferenceCounted touch()
- Specified by:
touchin interfaceio.netty.util.ReferenceCounted
-
touch
public io.netty.util.ReferenceCounted touch(java.lang.Object o)
- Specified by:
touchin interfaceio.netty.util.ReferenceCounted
-
release
public boolean release()
- Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
release
public boolean release(int i)
- Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
-