final Channel.ID channel = this.ioManager.createChannel();
// create the writer output view
List<MemorySegment> memory = this.memoryManager.allocatePages(this.parentTask, NUM_MEMORY_SEGMENTS);
final BlockChannelWriter writer = this.ioManager.createBlockChannelWriter(channel);
final ChannelWriterOutputView outView = new ChannelWriterOutputView(writer, memory, MEMORY_PAGE_SIZE);
// write a number of pairs
final Record rec = new Record();
for (int i = 0; i < NUM_PAIRS_SHORT; i++) {
generator.next(rec);
rec.write(outView);
}
this.memoryManager.release(outView.close());
// create the reader input view
memory = this.memoryManager.allocatePages(this.parentTask, NUM_MEMORY_SEGMENTS);
final BlockChannelReader reader = this.ioManager.createBlockChannelReader(channel);
final ChannelReaderInputView inView = new ChannelReaderInputView(reader, memory, outView.getBlockCount(), true);
generator.reset();
// read and re-generate all records and compare them
final Record readRec = new Record();
for (int i = 0; i < NUM_PAIRS_SHORT / 2; i++) {