returns a fetch task to be carried out . concode_field_sep int spiderTasksDone concode_elem_sep Map blocked concode_elem_sep Set assignedSpiderTasks concode_elem_sep Set assignedThinkerTasks concode_elem_sep List thinkerTasks concode_elem_sep int blockedCount concode_elem_sep int thinkerTasksDone concode_elem_sep List fetchTasks concode_field_sep int getJobCount concode_elem_sep int getBlockedCount concode_elem_sep void flagDone concode_elem_sep boolean allTasksDone concode_elem_sep WorkerTask getThinkerTask concode_elem_sep DecideOnSpideringTask[] unblock concode_elem_sep void schedule concode_elem_sep int getJobsDone concode_elem_sep int getThinkerJobCount concode_elem_sep int getSpiderJobCount concode_elem_sep void block concode_elem_sep int getAssignedCount concode_elem_sep int getThinkerJobsDone concode_elem_sep int getSpiderJobsDone
WorkerTask function ( ) { if ( fetchTasks . size ( ) > 0 ) { WorkerTask loc0 = ( WorkerTask ) fetchTasks . remove ( 0 ) ; assignedSpiderTasks . add ( loc0 ) ; return loc0 ; } if ( allTasksDone ( ) ) { throw new SpideringDoneException ( ) ; } else { throw new NoSuitableItemFoundException ( ) ; } }