use of com.hazelcast.internal.serialization.InternalSerializationService in project hazelcast by hazelcast.
the class AbstractInternalQueryCache method doFullKeyScan.
protected void doFullKeyScan(Predicate predicate, Set<K> resultingSet) {
InternalSerializationService serializationService = this.serializationService;
CachedQueryEntry queryEntry = new CachedQueryEntry();
Set<Map.Entry<Data, QueryCacheRecord>> entries = recordStore.entrySet();
for (Map.Entry<Data, QueryCacheRecord> entry : entries) {
Data keyData = entry.getKey();
QueryCacheRecord record = entry.getValue();
Object value = record.getValue();
queryEntry.init(serializationService, keyData, value, Extractors.empty());
boolean valid = predicate.apply(queryEntry);
if (valid) {
resultingSet.add((K) queryEntry.getKey());
}
}
}
use of com.hazelcast.internal.serialization.InternalSerializationService in project hazelcast by hazelcast.
the class NodeQueryCacheEventService method canPassFilter.
private boolean canPassFilter(LocalEntryEventData localEntryEventData, EventFilter filter) {
if (filter == null || filter instanceof TrueEventFilter) {
return true;
}
NodeEngine nodeEngine = mapServiceContext.getNodeEngine();
SerializationService serializationService = nodeEngine.getSerializationService();
Data keyData = localEntryEventData.getKeyData();
Object value = getValueOrOldValue(localEntryEventData);
QueryableEntry entry = new QueryEntry((InternalSerializationService) serializationService, keyData, value, Extractors.empty());
return filter.eval(entry);
}
use of com.hazelcast.internal.serialization.InternalSerializationService in project hazelcast by hazelcast.
the class DefaultQueryCache method addIndex.
@Override
public void addIndex(String attribute, boolean ordered) {
getIndexes().addOrGetIndex(attribute, ordered);
InternalSerializationService serializationService = context.getSerializationService();
Set<Map.Entry<Data, QueryCacheRecord>> entries = recordStore.entrySet();
for (Map.Entry<Data, QueryCacheRecord> entry : entries) {
Data keyData = entry.getKey();
QueryCacheRecord record = entry.getValue();
Object value = record.getValue();
QueryEntry queryable = new QueryEntry(serializationService, keyData, value, Extractors.empty());
indexes.saveEntryIndex(queryable, null);
}
}
Aggregations