public int dequeuePathQueries ( final VisitState visitState , final int maxUrls ) throws IOException { if ( maxUrls == 0 ) return 0 ; final int dequeued = ( int ) Math . min ( maxUrls , byteArrayDiskQueues . count ( visitState ) ) ; for ( int i = dequeued ; i -- != 0 ; ) visitState . enqueuePathQuery ( byteArrayDiskQueues . dequeue ( visitState ) ) ; return dequeued ; }
Dequeues at most the given number of path + queries into the given visit state .