Class CachedBufferAllocator.CachedBuffer

    • Field Detail

      • ownerThread

        private final java.lang.Thread ownerThread
      • buf

        private java.nio.ByteBuffer buf
    • Constructor Detail

      • CachedBuffer

        protected CachedBuffer​(java.nio.ByteBuffer buf)
    • Method Detail

      • buf

        public java.nio.ByteBuffer buf()
        Description copied from class: IoBuffer
        Returns the underlying NIO buffer instance.
        Specified by:
        buf in class IoBuffer
      • buf

        protected void buf​(java.nio.ByteBuffer buf)
        Description copied from class: AbstractIoBuffer
        Sets the underlying NIO buffer instance.
        Specified by:
        buf in class AbstractIoBuffer
        Parameters:
        buf - The buffer to store within this IoBuffer
      • array

        public byte[] array()
        Specified by:
        array in class IoBuffer
        See Also:
        ByteBuffer.array()
      • arrayOffset

        public int arrayOffset()
        Specified by:
        arrayOffset in class IoBuffer
        See Also:
        ByteBuffer.arrayOffset()
      • hasArray

        public boolean hasArray()
        Specified by:
        hasArray in class IoBuffer
        See Also:
        ByteBuffer.hasArray()
      • free

        public void free()
        Description copied from class: IoBuffer
        Declares this buffer and all its derived buffers are not used anymore so that it can be reused by some IoBufferAllocator implementations. It is not mandatory to call this method, but you might want to invoke this method for maximum performance.
        Specified by:
        free in class IoBuffer
      • free

        private void free​(java.nio.ByteBuffer oldBuf)