Package com.hazelcast.map

Examples of com.hazelcast.map.MapService$Merger


    }

    @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
    protected Object reduce(Map<Integer, Object> map) {
        int total = 0;
        MapService mapService = getService();
        for (Object result : map.values()) {
            Integer size = (Integer) mapService.toObject(result);
            total += size;
        }
        return total;
    }
View Full Code Here

    }

    @Override
    protected void afterResponse() {
        final long latency = System.currentTimeMillis() - startTime;
        final MapService mapService = getService();
        MapContainer mapContainer = mapService.getMapContainer(name);
        if (mapContainer.getMapConfig().isStatisticsEnabled()) {
            mapService.getLocalMapStatsImpl(name).incrementRemoves(latency);
        }
    }
View Full Code Here

        return MapPortableHook.ADD_INTERCEPTOR;
    }

    @Override
    protected OperationFactory createOperationFactory() {
        final MapService mapService = getService();
        id = mapService.addInterceptor(name, mapInterceptor);
        return new AddInterceptorOperationFactory(id, name, mapInterceptor);
    }
View Full Code Here

    }

    @Override
    protected void afterResponse() {
        final long latency = System.currentTimeMillis() - startTime;
        final MapService mapService = getService();
        MapContainer mapContainer = mapService.getMapContainer(name);
        if (mapContainer.getMapConfig().isStatisticsEnabled()) {
            mapService.getLocalMapStatsImpl(name).incrementGets(latency);
        }
    }
View Full Code Here

    }

    @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

    public MapRemoveEntryListenerRequest(String name, String registrationId) {
        super(name, registrationId);
    }

    public Object call() throws Exception {
        final MapService service = getService();
        return service.removeEventListener(name, registrationId);
    }
View Full Code Here

    }

    @Override
    protected Object reduce(Map<Integer, Object> map) {
        Set res = new HashSet();
        MapService service = getService();
        for (Object o : map.values()) {
            Set keys = ((MapKeySet) service.toObject(o)).getKeySet();
            res.addAll(keys);
        }
        return new MapKeySet(res);
    }
View Full Code Here

    }

    @Override
    protected void afterResponse() {
        final long latency = System.currentTimeMillis() - startTime;
        final MapService mapService = getService();
        MapContainer mapContainer = mapService.getMapContainer(name);
        if (mapContainer.getMapConfig().isStatisticsEnabled()) {
            mapService.getLocalMapStatsImpl(name).incrementPuts(latency);
        }
    }
View Full Code Here

    }

    @Override
    protected Object reduce(Map<Integer, Object> results) {
        List<Data> values = new ArrayList<Data>();
        MapService mapService = getService();
        for (Object result : results.values()) {
            values.addAll(((MapValueCollection) mapService.toObject(result)).getValues());
        }
        return new MapValueCollection(values);
    }
View Full Code Here

TOP

Related Classes of com.hazelcast.map.MapService$Merger

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.