@ SuppressWarnings ( { "WeakerAccess" , "unused" } ) // For library users public Searcher cancelPendingRequests ( ) { if ( pendingRequests . size ( ) != 0 ) { for ( int i = 0 ; i < pendingRequests . size ( ) ; i ++ ) { int reqId = pendingRequests . keyAt ( i ) ; Request r = pendingRequests . valueAt ( i ) ; if ( ! r . isFinished ( ) && ! r . isCancelled ( ) ) { cancelRequest ( r , reqId ) ; } } } return this ; }
Cancels all requests still waiting for a response .