Package org.dcache.xrootd.util
Interface ByteBuffersProvider
-
- All Superinterfaces:
io.netty.util.ReferenceCounted
- All Known Implementing Classes:
InboundReadResponse,WriteRequest
public interface ByteBuffersProvider extends io.netty.util.ReferenceCountedThis interface pulls out the two methods necessary to support the write. The reason for doing so is to avoid an additional buffer copy in translating a ThirdParty read request response into a write request.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetWriteOffset()static voidlogMetrics(java.lang.String when, io.netty.buffer.ByteBufAllocator allocator, org.slf4j.Logger logger, java.lang.String level)For monitoring memory usage by Netty allocators.java.nio.ByteBuffer[]toByteBuffers()
-
-
-
Method Detail
-
logMetrics
static void logMetrics(java.lang.String when, io.netty.buffer.ByteBufAllocator allocator, org.slf4j.Logger logger, java.lang.String level)For monitoring memory usage by Netty allocators. This method is best guarded by a conditional checking logger level activation.- Parameters:
when- info concerning the site of the callallocator- e.g., from the contextlogger- to uselevel- to log at (only supports "INFO", "DEBUG", "TRACE")
-
toByteBuffers
java.nio.ByteBuffer[] toByteBuffers()
- Returns:
- NIO buffer array produced from the Netty ByteBuf.
-
getWriteOffset
long getWriteOffset()
- Returns:
- the current offset to the buffer or channel receiving the written bytes.
-
-