private AsynchronousBulkBlockReader(FileIOChannel.ID channelID, RequestQueue<ReadRequest> requestQueue, List<MemorySegment> sourceSegments, int numBlocks, ArrayList<MemorySegment> target) throws IOException { super(channelID, requestQueue, new CollectingCallback(target), false); this.returnBuffers = target; // sanity check if (sourceSegments.size() < numBlocks) { throw new IllegalArgumentException("The list of source memory segments must contain at least" + " as many segments as the number of blocks to read."); } // send read requests for all blocks for (int i = 0; i < numBlocks; i++) { readBlock(sourceSegments.remove(sourceSegments.size() - 1)); } }
private AsynchronousBulkBlockReader(FileIOChannel.ID channelID, RequestQueue<ReadRequest> requestQueue, List<MemorySegment> sourceSegments, int numBlocks, ArrayList<MemorySegment> target) throws IOException { super(channelID, requestQueue, new CollectingCallback(target), false); this.returnBuffers = target; // sanity check if (sourceSegments.size() < numBlocks) { throw new IllegalArgumentException("The list of source memory segments must contain at least" + " as many segments as the number of blocks to read."); } // send read requests for all blocks for (int i = 0; i < numBlocks; i++) { readBlock(sourceSegments.remove(sourceSegments.size() - 1)); } }
private AsynchronousBulkBlockReader(FileIOChannel.ID channelID, RequestQueue<ReadRequest> requestQueue, List<MemorySegment> sourceSegments, int numBlocks, ArrayList<MemorySegment> target) throws IOException { super(channelID, requestQueue, new CollectingCallback(target), false); this.returnBuffers = target; // sanity check if (sourceSegments.size() < numBlocks) { throw new IllegalArgumentException("The list of source memory segments must contain at least" + " as many segments as the number of blocks to read."); } // send read requests for all blocks for (int i = 0; i < numBlocks; i++) { readBlock(sourceSegments.remove(sourceSegments.size() - 1)); } }
private AsynchronousBulkBlockReader(FileIOChannel.ID channelID, RequestQueue<ReadRequest> requestQueue, List<MemorySegment> sourceSegments, int numBlocks, ArrayList<MemorySegment> target, int bufferSize) throws IOException { super(channelID, requestQueue, new CollectingCallback(target), false); this.returnBuffers = target; this.bufferSize = bufferSize; // sanity check if (sourceSegments.size() < numBlocks) { throw new IllegalArgumentException("The list of source memory segments must contain at least" + " as many segments as the number of blocks to read."); } // send read requests for all blocks for (int i = 0; i < numBlocks; i++) { readBlock(sourceSegments.remove(sourceSegments.size() - 1)); } }