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) |
Modifier and Type | Method and Description |
---|---|
protected Result |
populateEmptyResult(Query query,
Collection<Integer> initialPartitions) |
protected Result |
populateNonEmptyResult(Query query,
Collection<QueryableEntry> entries,
Collection<Integer> initialPartitions) |
Result |
runIndexOrPartitionScanQueryOnOwnedPartitions(Query query) |
Result |
runPartitionIndexOrPartitionScanQueryOnGivenOwnedPartition(Query query,
int partitionId) |
ResultSegment |
runPartitionScanQueryOnPartitionChunk(Query query,
int partitionId,
int tableIndex,
int fetchSize)
Runs a query on a chunk of a single partition.
|
protected Collection<QueryableEntry> |
runUsingGlobalIndexSafely(Predicate predicate,
MapContainer mapContainer,
int migrationStamp) |
protected Collection<QueryableEntry> |
runUsingPartitionScanSafely(String name,
Predicate predicate,
Collection<Integer> partitions,
int migrationStamp) |
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) throws ExecutionException, InterruptedException
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)
protected Collection<QueryableEntry> runUsingPartitionScanSafely(String name, Predicate predicate, Collection<Integer> partitions, int migrationStamp) throws InterruptedException, ExecutionException
Copyright © 2017 Hazelcast, Inc.. All Rights Reserved.