Package com.hazelcast.map

Examples of com.hazelcast.map.MapEntrySet


        return new MultipleEntryOperationFactory(name,keys,processor);
    }

    @Override
    protected Object reduce(Map<Integer, Object> map) {
        MapEntrySet result = new MapEntrySet();
        MapService mapService = getService();
        for (Object o : map.values()) {
            if (o != null) {
                MapEntrySet entrySet = (MapEntrySet)mapService.toObject(o);
                Set<Map.Entry<Data,Data>> entries = entrySet.getEntrySet();
                for (Map.Entry<Data, Data> entry : entries) {
                    result.add(entry);
                }
            }
        }
View Full Code Here


        return new EntrySetOperationFactory(name);
    }

    @Override
    protected Object reduce(Map<Integer, Object> map) {
        MapEntrySet entrySet = new MapEntrySet();
        MapService service = getService();
        for (Object result : map.values()) {
            Set<Map.Entry<Data,Data>> entries = ((MapEntrySet) service.toObject(result)).getEntrySet();
            for (Map.Entry<Data,Data> entry : entries) {
                entrySet.add(entry);
            }
        }
        return entrySet;
    }
View Full Code Here

        return new PartitionWideEntryOperationFactory(name, processor);
    }

    @Override
    protected Object reduce(Map<Integer, Object> map) {
        MapEntrySet result = new MapEntrySet();
        MapService mapService = getService();
        for (Object o : map.values()) {
            if (o != null) {
                MapEntrySet entrySet = (MapEntrySet)mapService.toObject(o);
                Set<Map.Entry<Data,Data>> entries = entrySet.getEntrySet();
                for (Map.Entry<Data, Data> entry : entries) {
                    result.add(entry);
                }
            }
        }
View Full Code Here

    }

    public void read(PortableReader reader) throws IOException {
        name = reader.readUTF("n");
        ObjectDataInput input = reader.getRawDataInput();
        entrySet = new MapEntrySet();
        entrySet.readData(input);
    }
View Full Code Here

        return new PartitionWideEntryWithPredicateOperationFactory(name, processor, predicate);
    }

    @Override
    protected Object reduce(Map<Integer, Object> map) {
        MapEntrySet result = new MapEntrySet();
        MapService mapService = getService();
        for (Object o : map.values()) {
            if (o != null) {
                MapEntrySet entrySet = (MapEntrySet)mapService.toObject(o);
                Set<Map.Entry<Data,Data>> entries = entrySet.getEntrySet();
                for (Map.Entry<Data, Data> entry : entries) {
                    result.add(entry);
                }
            }
        }
View Full Code Here

        }
    }

    @Override
    public Object getResponse() {
        return new MapEntrySet(entrySet);
    }
View Full Code Here

        managedContext.initialize(entryProcessor);
    }

    @Override
    public void run() throws Exception {
        response = new MapEntrySet();
        final InternalPartitionService partitionService = getNodeEngine().getPartitionService();
        final RecordStore recordStore = mapService.getRecordStore(getPartitionId(), name);
        final LocalMapStatsImpl mapStats = mapService.getLocalMapStatsImpl(name);
        MapEntrySimple entry;
View Full Code Here

        final ManagedContext managedContext = getNodeEngine().getSerializationService().getManagedContext();
        managedContext.initialize(entryProcessor);
    }

    public void run() {
        response = new MapEntrySet();
        MapEntrySimple entry;
        final RecordStore recordStore = mapService.getRecordStore(getPartitionId(), name);
        final LocalMapStatsImpl mapStats = mapService.getLocalMapStatsImpl(name);
        final Map<Data, Record> records = recordStore.getReadonlyRecordMap();
        for (final Map.Entry<Data, Record> recordEntry : records.entrySet()) {
View Full Code Here

        }
        if (keySet.isEmpty()) {
            return result;
        }
        MapGetAllRequest request = new MapGetAllRequest(name, keySet);
        MapEntrySet mapEntrySet = invoke(request);
        Set<Entry<Data, Data>> entrySet = mapEntrySet.getEntrySet();
        for (Entry<Data, Data> dataEntry : entrySet) {
            final V value = (V) toObject(dataEntry.getValue());
            final K key = (K) toObject(dataEntry.getKey());
            result.put(key, value);
            if (nearCache != null) {
View Full Code Here

    }

    @Override
    public Set<Entry<K, V>> entrySet() {
        MapEntrySetRequest request = new MapEntrySetRequest(name);
        MapEntrySet result = invoke(request);
        Set<Entry<K, V>> entrySet = new HashSet<Entry<K, V>>();
        Set<Entry<Data, Data>> entries = result.getEntrySet();
        for (Entry<Data, Data> dataEntry : entries) {
            Data keyData = dataEntry.getKey();
            Data valueData = dataEntry.getValue();
            K key = toObject(keyData);
            V value = toObject(valueData);
View Full Code Here

TOP

Related Classes of com.hazelcast.map.MapEntrySet

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.