private void pruneExpiredQueries ( ) { if ( expirationQueue . size ( ) <= maxQueryHistory ) { return ; } int count = 0 ; // we're willing to keep full info for up to maxQueryHistory queries for ( T query : expirationQueue ) { if ( expirationQueue . size ( ) - count <= maxQueryHistory ) { break ; } query . pruneInfo ( ) ; count ++ ; } }
Prune extraneous info from old queries