/** * Executes the task asynchronously, returning the handle to the client. */ public TaskState execTask(Task task) throws RecordServiceException, IOException { validateIsConnected(); return execTaskInternal(task, 0); }
/** * Executes the task asynchronously, returning a Rows object that can be * used to fetch results. */ public Records execAndFetch(Task task) throws RecordServiceException, IOException { validateIsConnected(); TaskState result = execTaskInternal(task, 0); Records records = null; try { records = new Records(this, result); return records; } finally { if (records == null) closeTask(result); } }
TaskState newState = execTaskInternal(state.task_, state.recordsFetched_); state.handle_ = newState.handle_; continue;