public class CallerRunsPartitionScanExecutor extends Object implements PartitionScanExecutor
PartitionScanExecutor
which executes the partition scan in a sequential-fashion
in the calling thread.Constructor and Description |
---|
CallerRunsPartitionScanExecutor(PartitionScanRunner partitionScanRunner) |
Modifier and Type | Method and Description |
---|---|
void |
execute(String mapName,
Predicate predicate,
Collection<Integer> partitions,
Result result) |
QueryableEntriesSegment |
execute(String mapName,
Predicate predicate,
int partitionId,
int tableIndex,
int fetchSize)
Executes the predicate on a partition chunk.
|
public CallerRunsPartitionScanExecutor(PartitionScanRunner partitionScanRunner)
public void execute(String mapName, Predicate predicate, Collection<Integer> partitions, Result result)
execute
in interface PartitionScanExecutor
public QueryableEntriesSegment execute(String mapName, Predicate predicate, int partitionId, int tableIndex, int fetchSize)
PartitionScanExecutor
tableIndex
and the soft limit is defined by the fetchSize
. The method returns the matched entries and an
index from which new entries can be fetched which allows for efficient iteration of query results.
NOTE
Iterating the query results using the returned next table index should be done
only when the IMap
is not being mutated and the cluster is
stable (there are no migrations or membership changes).
In other cases, entries are rearranged and the you may get the same query result twice or
may miss some query results that match the predicate.
execute
in interface PartitionScanExecutor
mapName
- the map namepredicate
- the predicate which the entries must matchpartitionId
- the partition which is queriedtableIndex
- the index from which entries are queriedfetchSize
- the soft limit for the number of entries to fetchCopyright © 2022 Hazelcast, Inc.. All Rights Reserved.