@Override public void putAll(Map<? extends K, ? extends V> m) { MapEntrySet entrySet = new MapEntrySet(); for (Entry<? extends K, ? extends V> entry : m.entrySet()) { entrySet.add( new AbstractMap.SimpleImmutableEntry<Data, Data>( toData(entry.getKey()), toData(entry.getValue()))); } MapPutAllRequest request = new MapPutAllRequest(name, entrySet); invoke(request); }
@Override protected Object reduce(Map<Integer, Object> map) { MapEntrySet resultSet = new MapEntrySet(); MapService mapService = getService(); for (Map.Entry<Integer, Object> entry : map.entrySet()) { MapEntrySet mapEntrySet = (MapEntrySet) mapService.toObject(entry.getValue()); Set<Map.Entry<Data, Data>> entrySet = mapEntrySet.getEntrySet(); for (Map.Entry<Data, Data> dataEntry : entrySet) { resultSet.add(dataEntry); } } return resultSet; }
@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); } } } return result; }