new Transformer<MemcacheBatchIncrementResponse, Map<T, Long>>() {
@Override public Map<T, Long> transform(MemcacheBatchIncrementResponse response) {
Map<T, Long> result = new LinkedHashMap<T, Long>(requestedKeys.size(), 1);
Iterator<MemcacheIncrementResponse> items = response.getItemList().iterator();
for (T requestedKey : requestedKeys) {
MemcacheIncrementResponse item = items.next();
if (item.getIncrementStatus().equals(IncrementStatusCode.OK) && item.hasNewValue()) {
result.put(requestedKey, item.getNewValue());
} else {
result.put(requestedKey, null);
}
}
return result;