Map<KOut, List<VOut>> combinedValues = combine(mcc, c.removeCollectedValues());
Set<KOut> s = migrateIntermediateKeysAndValues(mcc, combinedValues);
intermediateKeys.addAll(s);
} else {
MapCombineTask<KIn, VIn, KOut, VOut> task = new MapCombineTask<KIn, VIn, KOut, VOut>(c, mcc, maxCSize);
dc.executeTask(new PrimaryOwnerFilter(cdl), task);
intermediateKeys.addAll(task.getIntermediateKeys());
//the remaining last chunk from collector
Map<KOut, List<VOut>> combinedValues = combine(mcc, c.removeCollectedValues());
Set<KOut> lastOne = migrateIntermediateKeysAndValues(mcc, combinedValues);
intermediateKeys.addAll(lastOne);
}
// in case we have stores, we have to process key/values from there as well
if (persistenceManager != null && !inputKeysSpecified) {
final DefaultCollector<KOut, VOut> pmc = new DefaultCollector<KOut, VOut>(maxCSize, true);
AdvancedCacheLoader.KeyFilter<?> keyFilter = new CompositeFilter(new PrimaryOwnerFilter(cdl),
new CollectionKeyFilter(dc.keySet()));
MapCombineTask<KIn, VIn, KOut, VOut> task = new MapCombineTask<KIn, VIn, KOut, VOut>(pmc, mcc, maxCSize);
persistenceManager.processOnAllStores(keyFilter, task, true, false);
intermediateKeys.addAll(task.getIntermediateKeys());