@Override public void putAll(Map<? extends K, ? extends V> m) { Map<Data, Data> map = new HashMap<Data, Data>(); for (Entry<? extends K, ? extends V> entry : m.entrySet()) { final Data keyData = toData(entry.getKey()); map.put(keyData, toData(entry.getValue())); } ClientMessage request = ReplicatedMapPutAllCodec.encodeRequest(getName(), map); invoke(request); }
@Override public void putAll(Map<? extends K, ? extends V> m) { List<Entry<Data, Data>> dataEntries = new ArrayList<Entry<Data, Data>>(m.size()); for (Entry<? extends K, ? extends V> entry : m.entrySet()) { dataEntries.add( new AbstractMap.SimpleImmutableEntry<Data, Data>( toData(entry.getKey()), toData(entry.getValue()))); } ClientMessage request = ReplicatedMapPutAllCodec.encodeRequest(name, dataEntries); invoke(request); }