Class ListMemorySegmentPool

  • All Implemented Interfaces:
    org.apache.flink.core.memory.MemorySegmentSource, MemorySegmentPool

    public class ListMemorySegmentPool
    extends Object
    implements MemorySegmentPool
    MemorySegment pool of a MemorySegment list.
    • Constructor Detail

      • ListMemorySegmentPool

        public ListMemorySegmentPool​(List<org.apache.flink.core.memory.MemorySegment> memorySegments)
    • Method Detail

      • nextSegment

        public org.apache.flink.core.memory.MemorySegment nextSegment()
        Specified by:
        nextSegment in interface org.apache.flink.core.memory.MemorySegmentSource
      • pageSize

        public int pageSize()
        Description copied from interface: MemorySegmentPool
        Get the page size of each page this pool holds.
        Specified by:
        pageSize in interface MemorySegmentPool
        Returns:
        the page size
      • returnAll

        public void returnAll​(List<org.apache.flink.core.memory.MemorySegment> memory)
        Description copied from interface: MemorySegmentPool
        Return all pages back into this pool.
        Specified by:
        returnAll in interface MemorySegmentPool
        Parameters:
        memory - the pages which want to be returned.
      • clear

        public void clear()