public class PartitionScanRunner extends Object
Modifier and Type | Field and Description |
---|---|
protected ClusterService |
clusterService |
protected ILogger |
logger |
protected MapServiceContext |
mapServiceContext |
protected NodeEngine |
nodeEngine |
protected OperationService |
operationService |
protected IPartitionService |
partitionService |
protected InternalSerializationService |
serializationService |
Constructor and Description |
---|
PartitionScanRunner(MapServiceContext mapServiceContext) |
Modifier and Type | Method and Description |
---|---|
protected Metadata |
getMetadataFromRecord(RecordStore recordStore,
Record record) |
protected long |
getNow() |
protected boolean |
isUseCachedDeserializedValuesEnabled(MapContainer mapContainer,
int partitionId) |
QueryableEntriesSegment |
run(String mapName,
Predicate predicate,
int partitionId,
int tableIndex,
int fetchSize)
Executes the predicate on a partition chunk.
|
void |
run(String mapName,
Predicate predicate,
int partitionId,
Result result) |
protected <T> Object |
toData(T input) |
protected final MapServiceContext mapServiceContext
protected final NodeEngine nodeEngine
protected final ILogger logger
protected final InternalSerializationService serializationService
protected final IPartitionService partitionService
protected final OperationService operationService
protected final ClusterService clusterService
public PartitionScanRunner(MapServiceContext mapServiceContext)
protected Metadata getMetadataFromRecord(RecordStore recordStore, Record record)
public QueryableEntriesSegment run(String mapName, Predicate predicate, int partitionId, int tableIndex, int fetchSize)
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 map 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, the iterator may not return some entries or may return an entry twice.
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 fetchprotected boolean isUseCachedDeserializedValuesEnabled(MapContainer mapContainer, int partitionId)
protected <T> Object toData(T input)
protected long getNow()
Copyright © 2020 Hazelcast, Inc.. All Rights Reserved.