Interface ByteBuffersProvider

  • All Superinterfaces:
    io.netty.util.ReferenceCounted
    All Known Implementing Classes:
    InboundReadResponse, WriteRequest

    public interface ByteBuffersProvider
    extends io.netty.util.ReferenceCounted
    This 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
      long getWriteOffset()  
      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.
      java.nio.ByteBuffer[] toByteBuffers()  
      • Methods inherited from interface io.netty.util.ReferenceCounted

        refCnt, release, release, retain, retain, touch, touch
    • 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 call
        allocator - e.g., from the context
        logger - to use
        level - 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.