Source:
void spillBuffer( CircularElement<E> element, ChannelWriterOutputView output, LargeRecordHandler<E> largeRecordHandler) throws IOException; void mergeRecords(MergeIterator<E> mergeIterator, ChannelWriterOutputView output) throws IOException; } private static final Logger LOG = LoggerFactory.getLogger(SpillingThread.class); private final MemoryManager memManager; private final IOManager ioManager; private final TypeSerializer<E> serializer; private final TypeComparator<E> comparator; private final List<MemorySegment> writeMemory; private final List<MemorySegment> mergeReadMemory; private final int maxFanIn; private final SpillChannelManager spillChannelManager; private final LargeRecordHandler<E> largeRecordHandler; private final SpillingBehaviour<E> spillingBehaviour; private boolean spillingBehaviourOpened = false; private final int minNumWriteBuffers; private final int maxNumWriteBuffers; SpillingThread( ExceptionHandler<IOException> exceptionHandler, StageMessageDispatcher<E> dispatcher, MemoryManager memManager, IOManager ioManager, TypeSerializer<E> serializer, TypeComparator<E> comparator, List<MemorySegment> sortReadMemory, List<MemorySegment> writeMemory, int maxNumFileHandles, SpillChannelManager spillingChannelManager, LargeRecordHandler<E> largeRecordHandler, SpillingBehaviour<E> spillingBehaviour, int minNumWriteBuffers, int maxNumWriteBuffers) { super(exceptionHandler, "SortMerger spilling thread", dispatcher); this.memManager = memManager; this.ioManager = ioManager; this.serializer = serializer; this.comparator = comparator; this.mergeReadMemory = sortReadMemory; this.writeMemory = writeMemory; this.maxFanIn = maxNumFileHandles; this.spillChannelManager = spillingChannelManager; this.largeRecordHandler = largeRecordHandler; this.spillingBehaviour = spillingBehaviour; this.minNumWriteBuffers = minNumWriteBuffers; this.maxNumWriteBuffers = maxNumWriteBuffers; }

Target:
void spillBuffer( CircularElement<E> element, ChannelWriterOutputView output, LargeRecordHandler<E> largeRecordHandler) throws IOException; void mergeRecords(MergeIterator<E> mergeIterator, ChannelWriterOutputView output) throws IOException; } private static final Logger LOG = LoggerFactory.getLogger(SpillingThread.class); private final MemoryManager memManager; private final IOManager ioManager; private final TypeSerializer<E> serializer; private final TypeComparator<E> comparator; private final List<MemorySegment> writeMemory; private final List<MemorySegment> mergeReadMemory; private final int maxFanIn; private final SpillChannelManager spillChannelManager; private final LargeRecordHandler<E> largeRecordHandler; private final SpillingBehaviour<E> spillingBehaviour; private volatile boolean spillingBehaviourOpened = false; private final int minNumWriteBuffers; private final int maxNumWriteBuffers; SpillingThread( @Nullable ExceptionHandler<IOException> exceptionHandler, StageMessageDispatcher<E> dispatcher, MemoryManager memManager, IOManager ioManager, TypeSerializer<E> serializer, TypeComparator<E> comparator, List<MemorySegment> sortReadMemory, List<MemorySegment> writeMemory, int maxNumFileHandles, SpillChannelManager spillingChannelManager, @Nullable LargeRecordHandler<E> largeRecordHandler, SpillingBehaviour<E> spillingBehaviour, int minNumWriteBuffers, int maxNumWriteBuffers) { super(exceptionHandler, "SortMerger spilling thread", dispatcher); this.memManager = checkNotNull(memManager); this.ioManager = checkNotNull(ioManager); this.serializer = checkNotNull(serializer); this.comparator = checkNotNull(comparator); this.mergeReadMemory = checkNotNull(sortReadMemory); this.writeMemory = checkNotNull(writeMemory); this.maxFanIn = maxNumFileHandles; this.spillChannelManager = checkNotNull(spillingChannelManager); this.largeRecordHandler = largeRecordHandler; this.spillingBehaviour = checkNotNull(spillingBehaviour); this.minNumWriteBuffers = minNumWriteBuffers; this.maxNumWriteBuffers = maxNumWriteBuffers; }