@ SuppressWarnings ( "unchecked" ) public Set < QueryableEntry > query ( Predicate predicate ) { stats . incrementQueryCount ( ) ; if ( ! haveAtLeastOneIndex ( ) || ! ( predicate instanceof IndexAwarePredicate ) ) { return null ; } IndexAwarePredicate indexAwarePredicate = ( IndexAwarePredicate ) predicate ; QueryContext queryContext = queryContextProvider . obtainContextFor ( this ) ; if ( ! indexAwarePredicate . isIndexed ( queryContext ) ) { return null ; } Set < QueryableEntry > result = indexAwarePredicate . filter ( queryContext ) ; if ( result != null ) { stats . incrementIndexedQueryCount ( ) ; queryContext . applyPerQueryStats ( ) ; } return result ; }
Performs a query on this indexes instance using the given predicate .