Package com.hazelcast.query.impl

Examples of com.hazelcast.query.impl.QueryEntry$PortableExtractor$PortableDoubleFieldExtractor


                Object entryValue = entry.getValue().value;
                final Object objectValue = entryValue instanceof Data
                        ? mapServiceContext.toObject(entryValue) : entryValue;
                Data dataKey = mapServiceContext.toData(objectKey);
                final SerializationService serializationService = getNodeEngine().getSerializationService();
                final QueryEntry queryEntry = new QueryEntry(serializationService, dataKey, objectKey, objectValue);
                if (predicate.apply(queryEntry)) {
                    valueSet.add(entryValue);
                }
            }
        }
View Full Code Here


            Data key = record.getKey();
            Object value = getValueOrCachedValue(record);
            if (value == null) {
                continue;
            }
            QueryEntry queryEntry = new QueryEntry(serializationService, key, key, value);
            if (predicate.apply(queryEntry)) {
                if (pagingPredicate != null) {
                    Map.Entry anchor = pagingPredicate.getAnchor();
                    if (anchor != null
                            && SortingUtil.compare(pagingPredicate.getComparator(),
View Full Code Here

    protected void saveIndex(Record record) {
        Data dataKey = record.getKey();
        final IndexService indexService = mapContainer.getIndexService();
        if (indexService.hasIndex()) {
            SerializationService ss = mapServiceContext.getNodeEngine().getSerializationService();
            QueryableEntry queryableEntry = new QueryEntry(ss, dataKey, dataKey, record.getValue());
            indexService.saveEntryIndex(queryableEntry);
        }
    }
View Full Code Here

        } else {
            testValue = serializationService.toObject(dataValue);
        }
        Object key = serializationService.toObject(dataKey);
        QueryEventFilter queryEventFilter = (QueryEventFilter) filter;
        QueryEntry entry = new QueryEntry(serializationService, dataKey, key, testValue);
        if (queryEventFilter.eval(entry)) {
            if (queryEventFilter.isIncludeValue()) {
                return Result.VALUE_INCLUDED;
            } else {
                return Result.NO_VALUE_INCLUDED;
View Full Code Here

                    if (event.getMigrationEndpoint() == MigrationEndpoint.SOURCE) {
                        indexService.removeEntryIndex(record.getKey());
                    } else {
                        Object value = record.getValue();
                        if (value != null) {
                            indexService.saveEntryIndex(new QueryEntry(serializationService, record.getKey(),
                                    record.getKey(), value));
                        }
                    }
                }
            }
View Full Code Here

    public Object getPredicate() {
        return predicate;
    }

    public boolean eval(Object arg) {
        final QueryEntry entry = (QueryEntry) arg;
        final Data keyData = entry.getKeyData();
        return (key == null || key.equals(keyData)) && predicate.apply((Map.Entry) arg);
    }
View Full Code Here

        List<Employee> results = new ArrayList<Employee>();
        do {
            set = map.entrySet(pagingPredicate);
            for (Map.Entry<Integer, Employee> entry : set) {
                Employee e = entry.getValue();
                QueryEntry qe = new QueryEntry(null, ss.toData(e.getId()), e.getId(), e);
                assertTrue(predicate.apply(qe));
                results.add(e);
            }
            pagingPredicate.nextPage();
        } while(!set.isEmpty());
View Full Code Here

TOP

Related Classes of com.hazelcast.query.impl.QueryEntry$PortableExtractor$PortableDoubleFieldExtractor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.