Class BufferManager

    • Constructor Detail

      • BufferManager

        public BufferManager​(org.apache.flink.core.memory.MemorySegmentProvider globalPool,
                             InputChannel inputChannel,
                             int numRequiredBuffers)
    • Method Detail

      • recycle

        public void recycle​(org.apache.flink.core.memory.MemorySegment segment)
        Exclusive buffer is recycled to this channel manager directly and it may trigger return extra floating buffer based on numRequiredBuffers.
        Specified by:
        recycle in interface BufferRecycler
        Parameters:
        segment - The exclusive segment of this channel.
      • notifyBufferAvailable

        public boolean notifyBufferAvailable​(Buffer buffer)
        The buffer pool notifies this listener of an available floating buffer. If the listener is released or currently does not need extra buffers, the buffer should be returned to the buffer pool. Otherwise, the buffer will be added into the bufferQueue.
        Specified by:
        notifyBufferAvailable in interface BufferListener
        Parameters:
        buffer - Buffer that becomes available in buffer pool.
        Returns:
        true if the buffer is accepted by this listener.