@Override public void run() { if (shutdownInProgress) { if (!Pipe.hasRoomForWrite(target, Pipe.EOF_SIZE)) { return; } requestShutdown(); return; } while (processAvailData(this)) { //keeps going while there is data to read and room to write it. } }
new TapeReadStage(gm, new RandomAccessFile(tapeFile,"rw"), loadedDataPipe);
long count = fileChannelRead(slabBuffer); if (count<0) { throw new UnsupportedOperationException("Unexpected end of file");
new TapeReadStage(gm, new RandomAccessFile(tapeFile, "r"), loadedDataPipe); //TODO: Must check that loading pipe is large enough