checks if queue is empty by checking at checkpoint_num points with checkpoint_interval_ms interval . this does n't mean the queue might not fill up at some point later , but it should decrease the probability that we lose a call this way . concode_field_sep RpcScheduler scheduler concode_elem_sep AtomicReference<BlockingQueue<E>> putRef concode_elem_sep int CHECKPOINT_NUM concode_elem_sep boolean clientBackOffEnabled concode_elem_sep long CHECKPOINT_INTERVAL_MS concode_elem_sep AtomicReference<BlockingQueue<E>> takeRef concode_elem_sep Log LOG concode_field_sep int parseNumLevels concode_elem_sep void setClientBackoffEnabled concode_elem_sep void addResponseTime concode_elem_sep T createScheduler concode_elem_sep Class<? extends BlockingQueue<E>> convertQueueClass concode_elem_sep T createCallQueueInstance concode_elem_sep Class<? extends RpcScheduler> convertSchedulerClass concode_elem_sep boolean shouldBackOff concode_elem_sep void put concode_elem_sep void swapQueue concode_elem_sep boolean offer concode_elem_sep E take concode_elem_sep int size concode_elem_sep boolean isClientBackoffEnabled concode_elem_sep String stringRepr concode_elem_sep int getPriorityLevel
boolean function ( BlockingQueue < ? > arg0 ) { for ( int loc0 = 0 ; loc0 < CHECKPOINT_NUM ; loc0 ++ ) { try { Thread . sleep ( CHECKPOINT_INTERVAL_MS ) ; } catch ( InterruptedException loc1 ) { return false ; } if ( ! arg0 . isEmpty ( ) ) { return false ; } } return true ; }