protected void sendReadRequest ( MemorySegment seg ) throws IOException { if ( this . numRequestsRemaining != 0 ) { this . reader . readBlock ( seg ) ; if ( this . numRequestsRemaining != - 1 ) { this . numRequestsRemaining -- ; } } else { // directly add it to the end of the return queue this . freeMem . add ( seg ) ; } }
Sends a new read requests if further requests remain . Otherwise this method adds the segment directly to the readers return queue .