Class WriteRequest
- java.lang.Object
-
- org.dcache.xrootd.protocol.messages.AbstractXrootdRequest
-
- org.dcache.xrootd.protocol.messages.WriteRequest
-
- All Implemented Interfaces:
io.netty.util.ReferenceCounted,XrootdRequest,ByteBuffersProvider
public class WriteRequest extends AbstractXrootdRequest implements ByteBuffersProvider
-
-
Field Summary
-
Fields inherited from class org.dcache.xrootd.protocol.messages.AbstractXrootdRequest
requestId, session, streamId
-
-
Constructor Summary
Constructors Constructor Description WriteRequest(io.netty.buffer.ByteBuf buffer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgetData(java.nio.channels.GatheringByteChannel out)intgetDataLength()intgetFileHandle()longgetWriteOffset()intrefCnt()booleanrelease()booleanrelease(int decrement)WriteRequestretain()WriteRequestretain(int increment)java.nio.ByteBuffer[]toByteBuffers()Converts this requests's payload into an array of NIO buffers.java.lang.StringtoString()io.netty.util.ReferenceCountedtouch()io.netty.util.ReferenceCountedtouch(java.lang.Object hint)-
Methods inherited from class org.dcache.xrootd.protocol.messages.AbstractXrootdRequest
getRequestId, getSession, getStreamId, getSubject, setSession
-
-
-
-
Method Detail
-
getFileHandle
public int getFileHandle()
-
getWriteOffset
public long getWriteOffset()
- Specified by:
getWriteOffsetin interfaceByteBuffersProvider- Returns:
- the current offset to the buffer or channel receiving the written bytes.
-
getDataLength
public int getDataLength()
-
getData
public void getData(java.nio.channels.GatheringByteChannel out) throws java.io.IOException- Throws:
java.io.IOException
-
toByteBuffers
public java.nio.ByteBuffer[] toByteBuffers()
Converts this requests's payload into an array of NIO buffers. The returned buffers might or might not share the content with this request.- Specified by:
toByteBuffersin interfaceByteBuffersProvider- Returns:
- NIO buffer array produced from the Netty ByteBuf.
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
refCnt
public int refCnt()
- Specified by:
refCntin interfaceio.netty.util.ReferenceCounted
-
release
public boolean release()
- Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
release
public boolean release(int decrement)
- Specified by:
releasein interfaceio.netty.util.ReferenceCounted
-
retain
public WriteRequest retain(int increment)
- Specified by:
retainin interfaceio.netty.util.ReferenceCounted
-
retain
public WriteRequest retain()
- 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 hint)
- Specified by:
touchin interfaceio.netty.util.ReferenceCounted
-
-