public Map processAll(Set entries) {
if (!entries.isEmpty()) {
Map backingMap = null;
List<Object> keys = new ArrayList<Object>(entries.size());
for(Object e: entries) {
BinaryEntry entry = (BinaryEntry) e;
if (backingMap == null) {
backingMap = entry.getBackingMap();
}
if (!entry.isPresent()) {
keys.add(entry.getKey());
// keys.add(entry.getBinaryKey());
}
}
ReadWriteBackingMap rwmap = (ReadWriteBackingMap) backingMap;
// rwmap.getAll(keys);
Map data = ((CacheStoreWrapper)rwmap.getCacheStore()).getCacheStore().loadAll(keys);
for(Object e: entries) {
BinaryEntry entry = (BinaryEntry) e;
Object value = data.get(entry.getKey());
if (value != null) {
// read-through is suggested synthetic update
entry.setValue(value, true);
}
}
}
return Collections.EMPTY_MAP;