/** * Constructs a new <code>Query</code> object. Uses the default namespace, which is the Objects * Context of the current application. * * @return The new <code>Query</code> object. * @throws IllegalArgumentException if the query syntax is invalid. * @see org.apache.geode.cache.query.Query */ @Override public Query newQuery(String queryString) { if (QueryMonitor.isLowMemory()) { String reason = String.format( "Query execution canceled due to memory threshold crossed in system, memory used: %s bytes.", QueryMonitor.getMemoryUsedBytes()); throw new QueryExecutionLowMemoryException(reason); } if (queryString == null) throw new QueryInvalidException( "The query string must not be null"); if (queryString.length() == 0) throw new QueryInvalidException( "The query string must not be empty"); ServerProxy serverProxy = pool == null ? null : new ServerProxy(pool); DefaultQuery query = new DefaultQuery(queryString, this.cache, serverProxy != null); query.setServerProxy(serverProxy); return query; }
DefaultQuery query = new DefaultQuery(this.queryString, pr.getCache(), false);