public class QueryRunner extends Object
Used by query operations only: QueryOperation & QueryPartitionOperation Should not be used by proxies or any other query related objects.
Modifier and Type | Field and Description |
---|---|
protected ClusterService |
clusterService |
protected LocalMapStatsProvider |
localMapStatsProvider |
protected ILogger |
logger |
protected MapServiceContext |
mapServiceContext |
protected NodeEngine |
nodeEngine |
protected OperationService |
operationService |
protected PartitionScanExecutor |
partitionScanExecutor |
protected QueryOptimizer |
queryOptimizer |
protected QueryResultSizeLimiter |
queryResultSizeLimiter |
protected ResultProcessorRegistry |
resultProcessorRegistry |
protected InternalSerializationService |
serializationService |
Constructor and Description |
---|
QueryRunner(MapServiceContext mapServiceContext,
QueryOptimizer optimizer,
PartitionScanExecutor partitionScanExecutor,
ResultProcessorRegistry resultProcessorRegistry) |
protected final MapServiceContext mapServiceContext
protected final NodeEngine nodeEngine
protected final ILogger logger
protected final QueryResultSizeLimiter queryResultSizeLimiter
protected final InternalSerializationService serializationService
protected final QueryOptimizer queryOptimizer
protected final OperationService operationService
protected final ClusterService clusterService
protected final LocalMapStatsProvider localMapStatsProvider
protected final PartitionScanExecutor partitionScanExecutor
protected final ResultProcessorRegistry resultProcessorRegistry
public QueryRunner(MapServiceContext mapServiceContext, QueryOptimizer optimizer, PartitionScanExecutor partitionScanExecutor, ResultProcessorRegistry resultProcessorRegistry)
public ResultSegment runPartitionScanQueryOnPartitionChunk(Query query, int partitionId, int tableIndex, int fetchSize)
tableIndex
and the soft limit fetchSize
.query
- the querypartitionId
- the partition which is queriedtableIndex
- the index at which to start queryingfetchSize
- the soft limit for the number of items to be queriedtableIndex
to resume queryingpublic Result runIndexOrPartitionScanQueryOnOwnedPartitions(Query query)
public Result runIndexQueryOnOwnedPartitions(Query query)
The method may return a special failure result, which has null
partition IDs
, in the following
situations:
The method may be invoked on any thread.
query
- the query to perform.null
partition IDs
this indicates a failure.public Result runPartitionIndexOrPartitionScanQueryOnGivenOwnedPartition(Query query, int partitionId)
protected Result populateEmptyResult(Query query, Collection<Integer> initialPartitions)
protected Result populateNonEmptyResult(Query query, Collection<QueryableEntry> entries, Collection<Integer> initialPartitions)
protected Collection<QueryableEntry> runUsingGlobalIndexSafely(Predicate predicate, MapContainer mapContainer, int migrationStamp, int ownedPartitionCount)
protected Result runUsingPartitionScanSafely(Query query, Predicate predicate, Collection<Integer> partitions, int migrationStamp)
Copyright © 2022 Hazelcast, Inc.. All Rights Reserved.