Class ListMemorySegmentPool

java.lang.Object
org.apache.flink.table.runtime.operators.sort.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 Details

    • ListMemorySegmentPool

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

    • 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.
    • freePages

      public int freePages()
      Specified by:
      freePages in interface MemorySegmentPool
      Returns:
      Free page number.
    • clear

      public void clear()