use of com.hazelcast.util.IterationType in project hazelcast by hazelcast.
the class PublisherCreateOperation method runInitialQuery.
private QueryResult runInitialQuery() {
MapQueryEngine queryEngine = mapServiceContext.getMapQueryEngine(name);
IterationType iterationType = info.isIncludeValue() ? IterationType.ENTRY : IterationType.KEY;
Query query = Query.of().mapName(name).predicate(info.getPredicate()).iterationType(iterationType).build();
return queryEngine.execute(query, Target.LOCAL_NODE);
}
use of com.hazelcast.util.IterationType in project hazelcast by hazelcast.
the class MapQueryEngineImpl method adjustQuery.
private Query adjustQuery(Query query) {
IterationType retrievalIterationType = getRetrievalIterationType(query.getPredicate(), query.getIterationType());
Query adjustedQuery = Query.of(query).iterationType(retrievalIterationType).build();
if (adjustedQuery.getPredicate() instanceof PagingPredicate) {
((PagingPredicate) adjustedQuery.getPredicate()).setIterationType(query.getIterationType());
} else {
if (adjustedQuery.getPredicate() == TruePredicate.INSTANCE) {
queryResultSizeLimiter.precheckMaxResultLimitOnLocalPartitions(adjustedQuery.getMapName());
}
}
return adjustedQuery;
}
Aggregations