public Future enqueue ( final QueryExecutionEvent event ) { if ( ! paused ) { return worker . submit ( new Runnable ( ) { @ Override public void run ( ) { QueryStats queryStats = statsByQuery . get ( event . getQuery ( ) ) ; if ( queryStats == null ) { statsByQuery . put ( event . getQuery ( ) , queryStats = new QueryStats ( event . getQuery ( ) ) ) ; } queryStats . addQueryTime ( event . getTime ( ) ) ; } } ) ; } else { return null ; } }
Enqueues a query execution event for processing .