private void startFetch ( ) { prepareConcurrentMultiGetTasks ( ) ; // set the time of starting fetch_start_time = System . currentTimeMillis ( ) ; if ( LOG . isDebugEnabled ( ) ) { LOG . debug ( "Start to fetch data using multiget, there will be " + multi_get_wait_cnt + " multigets to call" ) ; } for ( int con_idx = 0 ; con_idx < concurrency_multi_get ; ++ con_idx ) { final List < MultiGetTask > con_mul_get_tasks = multi_get_tasks . get ( con_idx ) ; final int task_index = multi_get_indexs . get ( con_idx ) . incrementAndGet ( ) ; if ( task_index < con_mul_get_tasks . size ( ) ) { final MultiGetTask task = con_mul_get_tasks . get ( task_index ) ; final MulGetCB mgcb = new MulGetCB ( con_idx , task . getTSUIDs ( ) , task . getGets ( ) ) ; mgcb . fetch ( ) ; } } // end for }
Start the work of firing up X concurrent get requests .